Raking light, meaning daylight or a sconce skimming along the wall at a low angle, throws a shadow off every ridge. On a smooth wall there's no texture to hide a repair, so the patch has to be truly flat.
Holes and deep cracks are filled with setting-type compound, which hardens by chemical reaction rather than by drying alone and shrinks far less than ready-mixed compound, so the fill doesn't sink a day later. Finish coats go on thin and are feathered well past the edges of the repair. Each coat is sanded and checked with a work light held flat to the wall before the next.
Textures such as orange peel or knockdown are matched in pattern and scale before priming. Popcorn ceilings are a special case: they should be tested for asbestos before anyone cuts into them.
Fresh compound soaks up paint differently from the wall around it, so an unprimed patch shows as a dull or shiny spot, called flashing. Every repair is spot-primed before the wall is repainted.