A tower controller at an airport talks to planes in the air as they arrive and depart. They are in the tower so they can see the planes visually, and may also have radar available.
Ground control also works in the tower, after all they have to be able to see the airport taxiways. They may also have a separate ground radar. They are only talking to planes on the ground.
At a busy airport, these will be separate individuals working each of these duties.
At a less busy airport, or during quieter hours, the same controller may work both tower and ground simultaneously.
There are also "center" controllers who work in the enroute traffic centers. They are not in towers and often not at any airport, as they talk with planes at altitude and work by radar and voice communication, not visual.
For example, in a typical departure, you first talk to ground control for taxi clearance and instructions. When you are ready for departure (near but not yet on the runway!) ground will say "contact tower on 123.45" (or whatever frequency), and tower will clear you for takeoff. After you've taken off, tower may say "contact center on 124.56" (again, whatever the frequency is).
While you're flying, each center controller will hand you off to a different center (and different frequency) which you cross between the different areas that the different centers cover.
For landing, it's the same thing in reverse order: center hands you off to tower as you approach the airport, and after you're on the runway, tower hands you off to ground (who again is up in the tower, but only talking to planes on the ground) for taxi instructions.