IIRC, Spain had a defender (Puyol) down on the ground after a collision with the goalkeeper, so the keeper (Casillas) deliberately through the ball out of bounds to stop play. When that happens, the other team is obligated to give the ball back on the throw in, as it shouldn't be their ball.
What happened next is something I've never seen, as when Holland was kicking the ball back to Casillas, it took an odd hop and bounced over his head towards the goal, and he had to tip it out past the back line. When he did that, technically it was Holland's possession on a corner kick, but since they didn't earn it, Van Persie kicked it back to Casillas. He was showing good sportsmanship.
Thanks... I was kind of half paying attention at that point, and thought the whole thing was weird.