A freewheel has all the cogs together along with the ratcheting mechanism. It is threaded onto the hub. A freehub has the ratcheting mechanism in the hub itself, the cassette is only the separate cogs and spacers, although most Shimano cassettes now have the largest few cogs and spacers locked together on a carrier.