You get used to what you do over and over.
I used to get very nervous playing in front of people, to the point of nearly violent shaking. Not so much anymore.
When playing with the band, my focus is mostly on them, or perhaps on a particular person that I can see in the audience. (One gig not to long ago, there was a mentally challenged person sitting on the front row. She was having a great time and was excellent feedback for the band. We knew it was good when she was happy and we could tell.) Playing on a stage with lights shining in our faces and the house dark, it's more like it's just us and we are actually focused more internally.
When playing solo, I do tend to withdraw into myself, the music, the piano I'm playing, and not try to pay much attention to anyone listening. If I do not know the people, it's even easier. If it's a setting where they're not there to specifically listen to the music, their attention only lasts a few seconds anyway at which time you're only background noise.
And... face it. No matter how much you practice, no matter how good you are, there is someone who is better than you out there. There just is. And even people like Oscar Peterson had people he admired at the piano and even he, as skilled as he was, was intimidated by Art Tatum. LOL! It's OK if you're not the best. It's OK if you make mistakes. (Victor Borge) Play with your heart and let the feeling flow through your music. It will. Mistakes? In Jazz, there are no mistakes. LOL!!