If your skin is sensitive or even otherwise, when you shave, you may find an area getting red and results in burning sensation and irritation. It is painful as well. Razor burn can really lead to microbial infection and hence, you should know how to get rid of razor burn.
First of all shave smoothly and lightly. Do not pretend as if your face is a towel and you are going to do everything to scrub off the dirt! Understand that the skin is very soft and you should handle it with care. Apply aftershave/moisturizer after you are done with the shave completely. You can also use a cream that contains aloe vera which will soothe your skin and heal it too. Use warm water and towel to clean off the skin.
You can also apply tea tree oil on affected area. Furthermore, while shaving try to make use of single-blade razor. You will not get a perfect shave no doubt, but it is very important to let the affected area heal that pay the price later. Do not even try to use any alcoholic product on your skin as it will cause irritation. Also, do not scrub the burn or scratch it too. Maintain a considerable distance between cologne/perfumes and burned skin.
Finally a few tips for you: Ice or cold water is god for freshly shaven skin as it will close the pores. Before shaving, apply a conditioner or lotion and leave it like that. It will settle on your skin and hence you will cause less to no damage to burn and worsen it. Also, use a very sharp razor. The ones that have been used before may not be sharp and can cause problems while shaving. Finally, be slow and make small strokes. Every time you want to wash off your razor, place it under warm running water.