Which atoms form which elements?
The general consensus is that each element is made up of unique atoms of that element's type. I address nucleosynthesis below, but this is not how elements become elements.
For example, oxygen is made of oxygen atoms. Titanium is made of titanium atoms. Neon is made of neon atoms.
The first good atomic theory, formulated by John Dalton and refined by Amadeo Avogadro and others has a the following principles (some of which are invalidated by modern experiments):

All matter consists of atoms as fundamental building blocks (we now know that subatomic particles are the real fundamental building blocks).
Atoms cannot be created or destroyed (we now have the ability to do this by nuclear fusion and fission).
Each element has its own characteristic type of atom (still valid).
All atoms of the same element element are chemically and physically indistinguishable (the discovery of isotopes invalidated this one).
Chemical reactions occur by the rearrangement of atoms (this one is still valid).

More modern atomic theory takes into account the discoveries of the subatomic particles and the development of quantum mechanics.
Atoms are now defined by their composition of the three principle subatomic particles: protons, neutrons, and electrons. Any atom can be characterized by three numbers derived from this composition:

Atomic Number ($Z$) - equal to the number of protons.
Mass Number ($A$) - equal to the sum of the numbers of protons and neutrons ($A=Z+N$).
Charge ($Q$) - equal to the difference between the number of protons and the number of electrons ($Q=Z-E$).

The atomic number, $Z$, defines to which element the atom belongs. For example, all atoms with $Z=1$ are hydrogen atoms. All atoms with $Z=6$ are carbon atoms. The periodic table is arranged by increasing atomic number. The atomic number controls the number of electrons an atom prefers (see below), and therefor controls the majority of the chemistry of an atom.
The number of neutrons (mass number) defines the isotope. For example, there are three isotopes of hydrogen, with $A=1$, $A=2$, and $A=3$: protium, deuterium, and tritium. These three isotopes have 0, 1, and 2 neutrons respectively, but they each have only one proton, so each of them is a hydrogen atom. The mass differences influence the properties of these isotopes subtly, but not in such a way that is usually noticeable to the average human.
The number of electrons (or more precisely the charge) determines whether the atom is neutral or an ion(http://en.wikipedia.org/wiki/Monatomic_ion). The number of electrons controls the behavior of an atom chemically (for example the number of covalent bonds that can be formed), and the number of electrons of a neutral atom is the same as the atomic number $Z$. For example, a carbon atom has 6 electrons (and you can go further into the quantum mechanics of electron configuration to learn that two of those electrons are less accessible than the other four, which accounts for most of carbon's chemical behavior). Carbon can have a number of electrons not equal to $Z$. If carbon were to have 7 electrons, the charge on carbon would be $Q=Z-E=6-7=-1$, making carbon an anion. Carbon behaves differently as an anion than it does as a neutral atom.
Atoms of some elements can be made by nuclear reactions. For example, in the sun hydrogen is converted into helium by the following pathway (and others). The notation below follows the generic example $^A_Z \ce{X}^Q$, where $X$ is the atomic symbol (and here $n$ means a neutron with $A=1$ and $Z=1$ and $Q=0$ and $e$ means an electron with $A=0$ and $Z=0$ and $Q=\pm1$). A proton is represented as $^1_1 \ce{H}^+$.
$$\ce{^1_1H + ^1_1H -&gt; ^2_2He}$$
$$\ce{^2_2He -&gt; ^2_1H + e+}$$
$$\ce{^2_1H + ^1_1H -&gt; ^3_2He}$$
$$\ce{^3_2He + ^3_2He -&gt; ^4_2He + ^1_1H + ^1_1H}$$
In addition to the nuclear transformations, gamma rays, neutrinos, and heat and being generated and flung around like it was nothing.
The number of possible nuclear reactions is humongous. I would go check out a book on nuclear reactions or nuclear chemistry from a library to learn more.