I remember reading an article on this topic awhile ago in a copy of Runners World, but I couldn't remember enough specific details about it to find the story on the magazine's website.
Anyway, the idea is that the human body has a lot of self-protection mechanisms to keep it from hurting itself, but we can override this message through the power of positive thinking. For example, you are doing track repeats and during the last repeat you're feeling out of breath and nauseous. Are you (probably) really about to have a heart attack or die from lack of oxygen? No. But your body doesn't even want to approach that point so it starts screaming for you to back down.
So then how do people work out through all that unpleasantness? How do great athletes manage to suffer through all that pain day in and day out to become great? The answer isn't that they eventually become so talented running fast is a breeze and they just don't feel pain anymore, but instead they've learned to think about that pain in a different way. They remind themselves that the discomfort is what they are striving for. It's not an indication of a crappy workout but rather a great one where they are pushing themselves. They tell themselves that feeling a little sick at the end of a 5k means they raced hard and that tired is exactly how you want to feel at the end of a marathon.
I like to try to remember this whenever I'm faced with a difficult situation- especially if it's an "in the moment" decision whether to stick with something difficult or to give into the temptation to quit right then.
If you're dieting and someone brings in a huge tub of your favorite goodie, it's going to be hard to resist eating it. But if you tell yourself, "Well, dieting is supposed to be hard," it seems to make resisting easier. You're empathizing with yourself but not giving in.
Another time I use this is when I'm doing a tempo run or repeats. Sometimes feeling physically bad is kind of scary, but if you tell yourself that the workout is supposed to be tough (earn your rest!) and you're supposed to be tired/winded then all of a sudden the tone of the workout goes from bad (physical pain and doubt) to good (pride over sticking with something difficult).
2 sets of stairs
Walk to work