What are the primary ingredients used in brewing beer, and how do they contribute to its flavor and characteristics?