I don't know if it has been explained already (edit: ninja'd), but let me try:
There are three categories of moves: physical, special, and status. If the attack isn't damaging, it falls in the later category (think Agility, Sleep Powder, Sand Attack, Substitute, etc.).
If the attack is damaging, then it can be either physical or special. Most attacks that involve hitting the other pokemon are physical, and most attacks that involve some sort of energy (fire, electricity, sometimes water, etc.) are special. I'm not very acquainted with the newer generations, but there should be a small symbol next to the move in the status screen of your pokemon that indicates what category of move they are.
If the move is physical, the damage inflicted depends on the physical attack of the attacker, and the physical defense of the defending pokemon. Likewise, if the move is special, the damage inflicted depends on the special attack of the attacker, and the special defense of the defender. So you want to teach your pokemon moves that use their higher stat, unless both are close to each other, in which case you might want to teach them both to exploit the lower defense stat of the pokemon you are facing.
As an example, Onyx has an extremely high physical defense, which means he can somewhat take a beating from ground pokemon and still stand, despite being weak to that type. However, he has a low special defense, so he won't last very long against Psychic attacks, despite not being weak against it (e.g. my default starting strategy in pokemon yellow was to catch a Caterpie and evolve it into a Butterfree so that he would learn confusion; poor move choices by the AI usually meant that it would defeat Brock's Onyx before the second rock throw).
Similarly, you could teach thunderbolt to, say, a Primeape, but he will still (probably) do more damage against a water type pokemon using regular fighting moves, since his special attack is so much lower than his physical attack. And so on.
It's not the most important thing, just check if your pokemon have very high physical / special attack, and teach them moves of that category.
PPED 2