A HOUSE OR A FLAT?

What are the differences between buying a house and buying a flat? Which is best? Which should you buy if you have a choice?