Both plugin types increase the loudness. But what's the technical difference and in which case do you use which plugin type?
Actually, a compressor's main purpose is not always to increase loudness. It can be used in many other functions such as shaping transients, controlling variable peaks and just generally modifying the dynamics of it's input.
The maximizer's purpose is to increase loudness. They have various methods for accomplishing this and some even claim not to effect dynamics at all (such as the UA Precision Maximizer). Some maximizers may introduce a little "sizzle" to your sound or warmth etc. (as will some compressors) to achieve their goal.
At the end of the day it's going to come down to the track. If you are mixing some hard hitting house music for the club, a maximizer might give your track exactly what it needs to bang. On a softer track, a maximizer might just be too much for the texture you are going for.
Your best bet is to mix with your ears. Try both in various contexts and see how they sound. Over time you will come to know what to put where.