* 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)