Cover can be anything from patches of grass, to boats that have sank. Here I'll briefly discuss a few common types of cover and why they often hold fish.
Rock: Rock is a cover element that holds a variety of crustaceans. Crustaceans are typically high in protein and thus they attract a fair share of baitfish and gamefish. Many species of of fish also prefer to lay their eggs on a hard bottom during the spawn.
Wood: Wood in the form of laydowns, brush piles, etc., offer a place for baitfish to hide. This in turn attracts gamefish. Wood also provides shade. In warmer months when the water gets hot, fish will rest in these shady areas to cool off.
Grass: Once again, grass provides a place for baitfish to hide from their predators. Gamefish will often cruise along the edge of weedlines looking for a meal. Water with grass near by also will be more oxygenated, which fish need to survive. This is why grass can be a solid option in hotter months when the water is less oxygenated.