Here's what I've found to be the easiest way to change the bulbs in the '04 foglights. The bulbs are H3s btw, as stated in the WRX owners manual. Unlike the headlights, the manual doesn't give any instruction on how to change the foglights. It just says it will be too hard and to take it to the dealer. So here's my take on it.
The pictures are all of the passenger side fog light. Start by removing the plastic surround. It's just held in by small clips, so just pry it off with a flathead screwdriver. There's a little notch at the medial end of the surround that can get you started.