Respondeat superior means that an employer can be held liable for a tortious act of his employee if the employee commits the tort while performing his duties as an employee.  The employer will not be liable if the employee commits the tort for his own interests and where his actions are not within the scope of his employment.

For example, let’s say David delivers pizza for Ricky’s pizza shop.  While delivering a pizza David drives carelessly and slams his car into Patty’s car.  Patty should be able to sue David for negligence and also sue Ricky’s pizza shop pursuant to a theory of respondeat superior.  

But let’s say David decides to play a joke on Patty by jumping in front of her and screaming while she is walking down the street.  Patty is terrified and sues for David for assault.  Jumping in front of Patty and screaming has no connection to David’s job and the prank was committed to further his own interests.  Ricky’s pizza shop is probably not liable for David’s actions.