4 hours is a very short time to go into the city and back. I guess if you have an EU nationality and are traveling Schengen to Schengen they it may be possible to leave, take the train to Centraal - the main train station - hang out for 1 hour and then take a train back.
If you have to go through immigration in addition to security or if you are flying to the US or TLV then I would stay around the airport.
If you exit immigration there is a central hall at the airport with shops and a nice supermarket. You could buy some goodies.