Pain isn’t supposed to feel good, right? There’s unexpected pain like stubbing your toe, a random headache, an awful stomachache, debilitating back pain and, of course, all kinds of pain—physical and mental—from trauma. No one loves any of that. But you’ve likely heard people talk about their love affair with workouts that “hurt so good.”

You’re one crunch away from feeling like your stomach is fully on fire, yet it somehow has this feel-good pain you come back for time and time again. You’re sprinting as fast as you can to the finish line of a road race. Your chest feels like it might blow up. Your throat is stinging. Your legs are going numb. But something about it feels good.

So what’s happening?

Well, first of all, we’ve come to associate physical activity with a little discomfort, and even a bit of pain. While no one is suggesting you push yourself to the brink, a little burn is normal, and because you’ve become conditioned to understand that, you can appreciate it to the point of finding it to feel good.

“Effort and discomfort go together and that’s what most people would call good pain—you generally expect to feel some level of discomfort,” explains Carly Ryan, exercise physiologist at Exercise and Sports Science Australia.

But is it weird to feel a little joyous about the pain? According to Michael Mackin of MMfitness, it actually makes sense that we would feel good, since, when you exercise, a chemical called dopamine gets released. This neurotransmitter plays a role in pleasure and happiness.

There’s also the psychological aspect of simply knowing that, if you aren’t physical, the repercussions can range from guilt and negative self-talk to feeling like a lazy couch potato who can’t outrun a turtle. Being active is a huge part of being healthy—and you’ve been informed of it your entire life. When you experience that discomfort from doing something good for you, it’s surely associated with confidence that you’re making yourself a stronger person both mentally and physically.

Always be sure to know the difference between a feel-good burn and full-on pain, however.

“A little bit of a burn that goes away when your muscles stop working is often just a result of the exercise, so it’s OK to continue,” says Ryan. “But if it continues and you’re getting, say, a sharp pain in your knees or you feel a painful twinge in your hamstrings that affects your ability to keep moving, then it’s most likely pain because you’ve overdone it, so you need to stop.”