There are three major ways in which martial artists learn to deal with pain.
Toughing through it
This is one of the more commonly cited methods. Basically, by being hurt repeatedly, you start to condition your body to continue on beyond the pain. You hurt, but swelling and stiffness is reduced and toy set aside the psychological reactions.
Meditative coping
This is a bit more advanced, but it's possible to "put the pain aside" through active meditation. This is also how woo like hypnosis and acupuncture work to eliminate pain and nausea, essentially latching onto the placebo effect. They know it's the same methodology because there's a drug that disables the effect. It is more of an upper level thing, take some concentration, and can be dangerous because pain is how the body tells you to stop before you really get hurt.
Reflex/drills
This is more for midfight reactions, but one of the reasons martial arts rely on so much repeated drilling is that it lets you react even when you're not with it due to pain. When you get popped in the noise, your eyes will water and you will most likely not be able to consciously react. However, trained reflexes will have you guarding, or even counterattacking, without having to think. You can see this in MMA fights where a fighter will often keep fighting for several seconds after getting knocked out, sometimes enough to recover and keep fighting.
Aftermath
And, of course, afterwards, there is some benefit to things like massage to relieve cramping muscles and there are many traditional martial arts ointments that aid in healing. It's nothing mystical - you can get the same results with a massage therapist and/or something like Bengay - but it is something most martial artists get taught to use.