Hi Ethan; as Kris said, that's a very astute question! At the beginning, billions and billions of years ago, there was primarily only Hydrogen and Helium. It was only through generations and generations of stars -- creating the carbon, nitrogen, oxygen through their nuclear reactions deep in the stellar cores from the Hydrogen and helium, then spewing it into their host galaxies as the stars died (and became in some cases explosive supernovae, which create even more exotic elements) which then contributed to making new stars, that the stars of our Sun's generation have a whole bunch of elements beyond Hydrogen and Helium (although those are still by far the greatest components of our Sun). Our Sun has Magnesium and Titanium and Sodium and .... many, many element which were made from earlier generations of stars. All naturally occurring elements on Earth came from previous generations of stars. Including everything that is you. That's pretty wild. As you may have seen Bill Nye the Science Guy say (as popularized years ago by Carl Sagan), "we're all Star Stuff".
An entertaining mix of music, images, and featuring clips of some giants in science/astronomy popularization is at http://www.youtube.com/watch?v=XGK84Poeynk.
enjoy, -KD