I recently told a friend I needed a pep talk. “What kind?” he asked.

He had a very good point. Everyone wants to be the type of person who gives the pivotal talk that turns around a friend’s outlook or makes a person feel good setting off on a new course.

But, giving a good pep talk isn’t easy. It requires an understanding of what your audience needs—whether it is simply cheering up or motivating to change. You need to listen and empathize, but also to affirm the other person’s strengths. And he or she needs to know when to stop talking.

“A lot of people think they are giving a pep talk but they are just saying what they would want to hear or what they think the other person wants to hear,” says Stacy Kaiser, a licensed psychotherapist in Los Angeles. “They’re not plugging into what the person really needs.”

Researchers at the University of Louisville, who have been studying social support since the 1980s, point to four categories of behavior people use when they’re trying to cheer someone up. Not coincidentally, they say these are also commonly employed by sports coaches to motivate their players.

The most common type of social support, or pep talk, they say, is to offer solace or emotional encouragement. This involves listening intently and empathizing, and often a pat on the back or a heartfelt hug. The next most common type of social support is to try to help someone solve his or her problem, either by giving advice or brainstorming a solution.

Click for more from The Wall Street Journal.