Appendix:User142 Ruby Sapphire walkthrough/Pokémon types
From Bulbapedia, the community-driven Pokémon encyclopedia.
In the Red/Blue Pokémon games, one of the basic ideas is that there is no universally best Pokémon. As part of this idea, each Pokémon has one or two types, and each move has a type. Every move would effect most Pokémon the normal amount, but some types would be "weak" to it, i.e it would do twice the amount of damage, and other types would be "resistant" to it, i.e the move would only do half the damage. Note that if the move is strong enough, even half of it can be very powerful. Then a few types were "immune" to specific types, i.e moves of that type wouldn't damage them.
If a Pokémon has two types, things get more complicated. What happens is that each type is effected seperately by the move, and the results are multiplied. So if one type is effected normally by the move, ignore it. If one type is immune to the move, ignore the other one. If both types are weak, the move does 4 times the damage. If both types are resistant, the move does a quarter damage. And if one type is weak and the other is resistant, they cancel each other and the Pokémon is effected normally.
Note that all what was stated above refers to the type of move used, not the Pokémon using it. A Dragonite using an Electric move on an Aerodactyl would do double damage, regardless of the fact that Dragonite isn't Electric.
Since Red/Blue/Yellow, there have been a few changes made. Magnemite and Magneton became Electric/Steel, a few Normal moves got other types, and there were a few changes made to the type-matching information.

