I could never figure out the pattern to this behavior, so I would always take the fail-safe method of moving to the playing playlist to pause. However, I discovered the other day that I don't have to. The Play/Pause button has the pause symbol (two vertical rectangles) if it is going to pause, and the stop symbol (a square) if it is going to stop. No more guessing!
[kirkmc adds: This is less of a hint than an observation, but it's one that had me scratching my head for a while in the early days of iTunes. Note also that if you are playing a song from one playlist, then switch to another to organize files for example, when the song ends, iTunes won't play the next song in its playlist. If you're playing from your library, however - in browse mode for example - it will continue playing subsequent tracks.]

