Frolic and detour in the law of torts occur when an employee (or agent) makes a physical departure from the service of his employer (or principal).
A detour occurs when an employee or agent makes a minor departure from his employer's charge whereas a frolic is a major departure when the employee is acting on his own and for his own benefit, rather than a minor sidetrack in the course of obeying an order from the employer.
However, in order for liability to be absolved, the employee must be engaged in a frolic, and not simply a detour (which may or may not result in absolution depending on additional circumstances).
For example, when a delivery truck driver takes a longer route to the location he is supposed to deliver packages to because he wants to, say, see a new controversial billboard put up in town that has caused some public debate, he has merely taken a detour from his primary role as an employee/agent of the delivery company.
Conversely, if the same delivery truck driver decided to skip work for a few hours to catch a baseball game and, en route to the game he struck a pedestrian, his employer/principal would likely avoid liability, as the driver/employee/agent's actions have constituted a frolic, and his negligent actions occurred in furtherance of an act wholly separate from his employment, even though technically he is being paid during that time by his employer/principal.