Shaving with the grain means shaving in the direction where the hair grow. This makes the shave smooth and reduces irritation and redness on the skin.
Razor bumps occur when curly hairs grow back into the skin causing inflammation, irritation and eventually scarring. So it's best to avoid getting razor bumps, use single blade razors and mosturize your skin after each shave.