Well, there are basically two things that hold it together. Two forces, that is. The first of these has to do with electric charge, something I mentioned on the previous page. Electric charge comes in two varieties: positive and negative. The main carriers of positive charge are protons, while the main carriers of negative charge are electrons. (Within protons and neutrons, the quarks themselves carry charge, but this is only important to us in that the net charge of a proton or neutron is equal to the sum of the charges of all its quarks: zero for a neutron, and a small positive amount for a proton.) Every proton carries exactly the same amount of positive charge, and every electron carries a negative charge exactly opposite that of a proton. There are other particles with electric charge, but they tend to live only a very short time before they decay, and so they're mostly unimportant for atoms.
The significance of electric charge is that it forms the basis for electric force. Any particle with electric charge will exert a force on any other particle with charge. (And vice versa, of course.) And there are two rules describing the electric force.
That is, a proton and an electron will attract each other. The closer they are together, the stronger this attraction will be. Two protons (or two electrons) will repel each other. And again, the closer together they are, the stronger the repulsion. Now the nucleus of an atom is positively charged, while electrons are negatively charged. As a result, a nucleus will attract electrons. These electrons will swarm around the nucleus, and the result is an atom.
Now we haven't explained everything yet. The electric force explains how the electrons are bound to the nucleus of an atom. But we haven't said anything about what holds the nucleus together. The electric force can't account for this, and in fact, the electric force actually works against holding the nucleus together.
Remember, the nucleus contains neutrons and protons. The neutrons are electrically neutral, and so the electric force won't hold them in. Furthermore, the protons are all positively charged, and so they all repel each other. So if the electric force was the only force involved, you couldn't create a nucleus. You could try to push all those protons and neutrons together, but as soon as you let go, the protons would all shoot away from each other, and the neutrons would drift apart as well. There has to be some other force that holds protons and neutrons together.
Of course, since the electric force is constantly trying to drive the protons apart, the force that holds them all in must be stronger than the electric force. And keep in mind, the electric force gets stronger as charged particles get closer together, and the protons in a nucleus are very close together. As a result, the force that holds protons and neutrons together must be very strong. Well, in a brilliant stroke of imagination, physicists have named this force "the strong force."
The strong force is a force which attracts protons to protons, neutrons to neutrons, and protons and neutrons to each other. The force has a very short range, and this is the reason the nucleus of an atom turns out to be so small. In addition, the strong force is also responsible for binding the quarks and gluons into protons and neutrons.
So the nucleus of an atom is held together by the strong force, while the electrons are held in the atom by the electric force. If you're more interested in these forces, you might want to try Dave's Microcosmos.