Surprisingly, the PS3 is one of the few consoles to have a lot of audio output options, and you can use all of them one way or another.
HDMI Audio Extractor
An HDMI Audio Extractor is a kind of adapter that grabs your HDMI signal and gives you some kind of port to get audio out. This is usually 3.5mm but you can also find some that do optical. In your case, any one of them will do as long as they have the 3.5mm output.
Your PS3 audio output needs to be set to "HDMI".

SPDIF/Optical Audio Adapter
The PS3 allows you to output digital audio over an optical cable. This can be converted from digital to analog with an adapter so you can use headphones. You need to make sure that it has a 3.5mm jack, as most of them come with the classic white and red RCA connectors.
Your PS3 audio output needs to be set to "Optical Digital".

AV MULTI to 3.5mm
This one is the cheapest and easiest options if you already have the AV MULTI cables that come with all PS1/2/3 consoles. The idea is to adapt it into a 3.5mm female connector.
You get the AV MULTI to Composite cable that comes with every PS1/2/3 console that looks like this:

And connect one of this, which is a Female RCA to Female 3.5mm TRS adapter:

Your PS3 audio output needs to be set to "Analog Input Connector / SCART / AV MULTI".