Once you clear customs, you're free to leave the airport. Amsterdam is about 25 miles from Schiphol. If your layover is four or more hours, you can take the train, taxi, or private car into the city. I'd stick to the canal belt area (Grachtengordel) and see the sights in that area.