Flats are almost always leasehold. Imagine living in a block of flats, where the flat above you has a hole in the roof, which leaks onto your property. If it's a leasehold, you can force the owner to repair it.
If you buy leasehold, the freehold to a property can be owned by anyone - an individual, or even the council. It's doesn't affect you much, but you sometimes have to pay them a fee each year - it's often something daft like �3. You buy a lease for a set period of time, but this is nothing to worry about - it's often something like 100+ years. At the end of this time, you usually have the right to renew the lease for a fee.
Freehold is usually a little more expensive, but if buying a flat, expect it to be a leasehold. The only time to really avoid a leasehold is if there's not much left to run on it. If it only has a year left to run, you could have a problem at the end of that time.