When you detain someone, you hold them back, slow them down, or stop them from moving on. If you are detained by the police, you may be late for the big football game, even if you were speeding to get there by the kickoff.
There are lots of words that contain the root tain, like contain and retain. These come from Latin tenere, which means "to hold." Detain is specifically used when you're talking about holding someone so they can't go anywhere. It's often used in discussions involving the police who detain people who they think might be guilty. But you can use detain, say, when you're explaining why you were late: "I was detained at the office by a conference call that wouldn't end. Sorry."