The Octet Rule expresses the idea that atoms like to have eight electrons in their outermost shell, known as the valence shell. This provides something like an explanation for many chemical phenomena - for a start, the noble gases which make up the right-most column of the Periodic Table don't usually bond with anything at all, because their outside shells are already full. The next column in, the halides, is extremely reactive because their valence shells have seven electrons, so they only need one more to bring them up to the magical number, eight. Over on the other side of the table we find the alkali metals, which are extremely reactive because in their electrically neutral form, they only have one electron in their outside shell, floating all on its own, and only weakly attracted to their nucleus - especially in the larger atoms, where the electrons are further out. If they manage to lose that electron, which doesn't take much, they are immediately left with the eight electrons in the shell underneath, and the octet rule is satisfied.
The same thing happens when the alkaline earth metals, in the second column of the Periodic Table, lose two electrons, so they are also reactive but not so dramatically as their neighbours. Similarly, the elements in the sixth column can get a full shell by gaining two electrons. They can do that in two ways - either they acquire a pair of electrons and make off with them, allowing them to make compounds with metals by ionic bonding; or they share a pair of electrons with another non-metal, to form covalent bonds. If an oxygen atom shares two of its electrons with another atom, that effectively brings its total up to eight, which is why oxygen atoms often bond with two other atoms, as in water. With a carbon atom, it takes four electrons to fill up its valence shell, so every atom can bond with as many four other non-metal atoms, a property which makes possible the vast array of complex molecules required for life as we know it. On the other hand, it would take some doing for carbon to satisfy the octet rule by ionisation - it would pretty much need to gain or lose four electrons all at the same time, which is why carbon is not usually found in ionic compounds.
So far so neat, but if you haven't studied so much chemistry that this stuff is already second nature to you, you may have a sense that this explanation is lacking a step or two. What on Earth is an 'electron shell'? Why would it want to have eight electrons in it anyway? And how much can we rely on this rule? Unfortunately there are no easy answers to any of these questions, so what follows are some quite difficult answers.
An electron shell is an abstraction - it refers to a collection of electrons in similarly-energetic 'orbitals' around an atom. I put 'orbitals' in quotes there because it's a technical term, with connotations that are misleading here. Electrons don't exactly orbit atoms, because they're not exactly particles - they're more like waves that carry electrical charge. When they're attached to an atom, they exist as standing waves around it. The fact we call them orbitals is a holdover from the 'solar system' model of the atom, proposed by Rutherford, which was superseded almost as soon as it was introduced, but which lives on in the popular imagination because it's so much easier to imagine than the quantum mechanical truth.
When we talk about a full outside shell of electrons, we mean there's one pair of electrons in a simple, spherical orbital (called an s orbital), and three more pairs of electrons in orbitals shaped more like hourglasses (p orbitals). Exactly three of those are physically possible, each pair being at right-angles to the other two.
So there's an explanation for the shape of the orbitals, having to do with the fact that electrons exist as standing waves around atoms. That still calls for an explanation of what it means for them to get 'full', though. Why is there space for two electrons in each 's' orbital, not just one, or more than two? This has to do with a property called spin, and the Pauli Exclusion Principle. Spin is a particularly abstract property for a thing to have, although it is related, somewhat obscurely, to the familiar observation that things sometimes spin around. If you imagine that every electron spins on the spot, and they can either spin clockwise or anti-clockwise, you won't go far wrong, although scientists usually talk about 'spin up' and 'spin down' rather than 'clockwise' and 'anti-clockwise'. The reason spin is important here is because the Pauli Exclusion Principle tells us that no two particles with the same quantum numbers can occupy the same space. Spin being a quantum number which can take one of two values, that means that exactly two electrons can occupy any given orbital. If you want an explanation that makes more sense than that, you'll probably need at least one degree in physics, chemistry or preferably both. Sorry about that. One other thing to note here - when that valence shell is full, the atom is stable because, in a sense, it becomes inert. It's left with the same electron configuration as one of the noble gases.
I should probably mention here that there are also electron shells with eighteen or thirty-two electrons in them, which is the main reason why the Periodic Table isn't a rectangle, but they're never the outermost shell; they have less energy, and hence smaller radii, than the s and p orbitals. The reasons for this, once again, are abstruse and quantum mechanical, and I won't get into them here. The consequences bring us back to my fourth question above - how reliable is the octet rule? The answer is 'not very'. It applies most of the time, especially for elements in the first couple of rows of the Periodic Table, but further down, when d and f orbitals start to become important, electrons from the lower shells can sometimes form bonds too, and things get significantly more complicated, with such weird chemicals as bromine pentafluoride. The Octet Rule is particularly useless for dealing with transition metals, which can typically lose one or more electrons, from different shells, and can sometimes gain extra ones too.
Chemistry, I find, is full of handy rules to which there are important exceptions; more than any other science, learning chemistry is like learning a language.