Most roleplaying in training begins with the trainer providing a problem situation, some guidance, and/or a basic script one person is to follow. We can call this formal or structured roleplaying and generally the trainer structures the roleplaying so it's most likely to address the purposes or learning objectives of the course, and it's clear to all that this is indeed, roleplaying.
However, sometimes learners are hesitant to participate in formal roleplaying even though they recognize its value.
Spontaneous roleplaying is really a method to "sneak roleplaying in" so that participant's don't actually realize it's going on.
Here's a brief dialogue that demonstrates:
Trainer: Fred, what would you do if a customer swore at you?
Fred: Well, I'd probably tell him to stop
Trainer: Ok. What exactly would you say to him, then. Pretend I've just sworn at you
Fred: Ok. I don't appreciate that kind of talk and if you continue....
Trainer: Good, Fred. Let's hear what other members of the group have to say about your response
Notice that Fred is actually doing a short roleplay, and then the trainer opens up the floor for feedback. All without making a big deal out of doing a roleplay.