A class trainer is an NPC who is able to train your character its many class-related skills (abilities, powers, and spells). They are able to teach new skills every 2 levels (even levels) until level 60, and every level for levels 60-80. For the most part, class trainers only exist in non-Northrend parts of Azeroth.
A class trainer can also untrain your talents (making you untalented) for a price. Untraining costs 1g the first time, then increases by 5g thereafter for a maximum cost of 50g. The costs are reduced by 5g each month to a minimum of 15g.
The trainer page has links to a comprehensive list of trainers for each class.