You can freeze hard cheese. The softer the cheese the less well it freezes.
Once cheese is frozen, though, its texture degrades. So it'll be ok to use to top pizza or make potatoes au gratin or otherwise use shredded, melted, etc. but it will not be good to eat on crackers or as part of a cheese tray or for any use that the cheese needs to be served in slices or chunks.
Its taste degrades a bit too but not as noticably as its texture.
People have often recommended that you vacuum-pack cheese bought in bulk rather than freeze it, but I have no experience doing this.
When I have scraps of cheese in the fridge that are going downhill, I wrap in plastic and toss in a ziplock in the freezer. When I get a good loaf of french bread I put all the scraps in the food processor with a dollop of butter and spread on the split french loaves and put under the broiler. YUMMY.