The key is to remove all residue of shaving cream, lotion, soap etc after the hair removal process. Apply a bit of cool water to close the pores and then apply your aftershave.
Here's some history. Way back when you had to go to a barber for a shave and a haircut, the aftershave was basically a scented alcohol. The barber would apply it as an antiseptic treatment to reduce the chance of infection. Today's versions of aftershave still have the alcohol, but also additives that help to nurture the skin and reduce the nasty burn and drying effect of alcohol.