You may be getting ingrown hairs because you're stretching the skin when you shave.
This results in the tip of the hair being flush with the stretched skin. When the skin relaxes to its normal state, the hair retracts into its follicle
. The hair does not grow straight out but curves as it grows, and in the process "grows into" the wall of the follicle.