There will always be an ultimate freehold title to any land, leaseholds layer on top of freeholds - think of it like a tenancy granted out of a landlord's house ownership (but obviously the rights are different). A leasehold doesn't have to be a flat, it just needs to be an interest in property which is granted by way of a lease by whoever owns the ultimate freehold title (or superior leasehold title - eg a lease granted out of someone's lease).
Essentially a lease is a right to occupy (and other rights) for a term (period of time) at a rent (which can be as little as a peppercorn).
An example could be a developer buying up a street of freehold houses, granting a lease for each of the houses out of their respective freeholds and selling the houses on. The developer would be the freehold owner (and can sell the freehold on) of the land and the landlord to the leases. They can then collect rent payable on the houses, make charges for consents required under the lease etc... It can be quite lucrative and there are companies who go around buying up freeholds.