on a basic level an amplifier "amplifies". It increases amplitude, it is merely "wire with gain".
INPUT => BOOST => OUTPUT
In the real world however its MUCH more complex than that. An amp adds current and voltage reserves to increase
dynamics.... not merely volume boost.
In many cases the amp is used to ATTENUATE the signal and present an ideal impedence load to your source. Plugging your cans straight into a line-output many times is ear-bleedingly loud. While this can be done, the headphones will present an un-optimal impedence load to the source, that fluctuates. So, something is needed after the source to alleviate these issues.
Amps can also color and EQ (GASP!!) the sound. OP amp and tube rolling is a popular method to tweek the synnergy between the amp, cans and source. Some amps also have treble/bass EQ, crossfeed, and multiple source inputs... so they can serve preamp duties as well.
USB amps are gaining popularity as well, so they serve dual roles as USB soundcards with DACs built-in.
want more?.....
Some tube amps also have speaker outputs. EL84 based, ~8 watt tube amps are somewhat common. I always thought it'd be COOL to have a small speaker amp and headphone amp all in one... to push a K1000 and a Grado (for example) out of the same amp.
Ive been in the presence of tube amps that get warm enough to heat a small apartment and roast marshmellows.
Tube amps look SWEET at night. Its so relaxing and theraputic to sit in a dim room, lit only by glowing firebottles and power LEDs. People (including me) always talk about "tube warmth", "tube tone"...etc... I'm willing to bet at least a small part of that it is psycho-acoustics at work.