There are three basic functions for filters, mechanical, biological and chemical.
Mechanical removes particles, biological converts wastes into progressively less harmful materials, chemical removes harmful materials. Once the biological is functioning, chemical is not so necessary.
All filters perform the first two in some fashion. Chemical is the most expensive as you have to keep replenishing the chemicals.
Mechanical screens out 'floaties', stuff floating free in the water. The faster the current, the more it will suck up. Biological requires beneficial bacterial colonies to form, which will convert highly toxic ammonia, which comes from fish waste or any rotting organic(excess food, dead anything) into NitrIte, and another beneficial bacteria which will convert the NitrIte(still very toxic) into NitrAte(much less toxic than either of the first two). NitrAte we control with regular water changes, generally weekly, but frequency depends on the concentration of NitrAte. Some people like to keep their NitrAte below 20 ppm, some below 10 ppm. I'm kinda in the middle, as long as it's below 15, I'm happy.
Hang-on-back filters can let water bypass the actual filtration process if they get somewhat clogged. Canister filters force water through the filtration process, and don't allow any bypass. Undergravel filters use the gravel as both mechanical and biological filter media(yep, a third type, old school, but still used).
Of the three, undergravel is usually the cheapest initially. Chemical filtration is problematic with these, as powerheads are needed to make them really efficient, and they go where the chemical cartridges would using airlift. But the media never needs replacing, just regular vacuuming.
Hang on back are the next cheapest, media needs replacement occasionally, chemical filtration quite doable. But it can allow bypass if not maintained regularly. Most expensive for maintenance.
Canister are most expensive initially, but almost as cheap as undergravel in long term maintenance.
Sponge filters are another option, but they take up a fair amount of room in a tank. They're mostly used by breeders, kind of a speciality filter.
It all boils down to personal preference, really. What you are willing to spend(and when) and your maintenance preferences. I hope this was helpful and didn't just muddy things further.
If you have particular questions about undergravel, Essabee or myself are probably the two most likely to know the answers, we both have used them extensively(Essabee even developed one for planted tanks, awesome!)