The chain on my girlfriend's bike came off the front gear today, it looks like the back gear changing mechanism isn't handling back-pedaling properly, whenever she pedals backwards the chain slacks rather than feeding through.

The chain doesn't seem to be taut enough and has at one point gone round the front gear and caught in the front gear changing mechanism.

Any idea what might be wrong? I'm sorry if I've got my terminology completely wrong here.

It's a 21 speed mountain bike if that helps.

**EDIT**
I've looked up the terminology now and it seems like there might be a problem with the rear derailer? It doesn't seem to be keeping the chain taut at the top and is just getting pulled almost to its limit towards the front of the bike.