One of my flights from the US routed through Schiphol then I entered Spain without going through customs or getting my passport stamped. I'm not really sure what happened.
Both the Netherlands and Spain are in the Schengen Area, so there's no border controls between them. The same happens if you go to Zürich via Paris, for example. I've done that a few times; you don't go through Swiss customs.