* Detect if something is plugged in
* Detect if the thing plugged in is a 3 pin (stereo speakers), or 4 pin (stereo speakers, plus microphone)
* Detect what type of 4 pin configuration is connected (there are 2 standards, CTIA and OMTP)
* Detect button presses from attached headphones (volume up/down, pause/play)
* Detect the type of headphones connected (do I want to use the high impedance driver, or the low impedance driver)
And obviously: play stereo audio and record mono audio.
There's also some lesser used features that are sometimes supported over 3.5mm:
* Video output (!!)
* Antenna input, for use for FM radio
* Stereo audio input
* Optical out (not through 3.5mm TRRS, but it is at the end of the 3.5mm jack... Apple used to use these in their macbook pros)
It generally isn't, no. Looking at a teardown of the iPhone 5 for example (just the first phone I thought to check) there is a single Cirrus Logic class D amplifier chip that handles both the speaker and headphone outputs. I don't know of and cannot find any phones that have a dedicated amplifier chip for the headphone output although I'm sure one exists somewhere.
In any more modern system, you use a different component or subsystem for each. iPhone 5 is a pretty old example and speaker technology has come a LONG way in phones. These days, you're driving watts of power into your phone speakers, any headphones driven with that much power wouldn't last very long.
Even very high end headphone amplifiers (external, chunky ones) tend to be rated for around 1W max. Typical is much lower, in the 100mW or less range. Either way, you aren't listening at that high of power unless you want hearing damage.