Activated carbon filters come in a variety of types. Their major purpose is to absorb and eliminate organic types of contamination such as chlorine, pesticides, and cleaning solvents (depending on the type of design).
Organic contaminants are a major contributor to poor tasting or smelling water. Carbon filters go by several names and they are one of the primary water filters out there. You might see them referred to as activated charcoal, activated coal, or AC filters.
It is an extremely porous material and has a very large surface area over which to absorb contaminants. That's one of the reasons they absorb so well.
Many activated carbon filters will absorb heavy metals as well, such as lead. This is extremely relevant because many older pipes have lead and other metals in them. Many metals and chemicals from the pipes dissolve into the water that passes through them. Remember, this is AFTER the water has left the treatment plant.
These types of filters will not remove bacteria and viruses, however. There is no single filter that will remove everything perfectly so that's why a combination of treatment processes is generally used.
Activated carbon filters will NOT filter hard water minerals such as calcium and magnesium (which is bad for machines, but great for our health). Machinery and animals often have opposite needs with the water they use. What's great for your iron (distilled water with no minerals) is horrible for your body that needs minerals.
Activated carbon will also not remove ions such as fluoride and nitrates. There are other filters that will, but it's also possible to electrically treat water to attract negative ions like fluoride and bromine out of the water we drink.