Highlighting and contouring are used to “sculpt” your face as shown in the diagram, by accentuating the natural high points/shadows in your face. This is based off the simple principle that light colors bring an area forward, while dark colors make an area recede. So you would apply light colors to the areas of your face that are naturally prominent, while applying dark colors to the areas of your face that naturally recede.
Highlighting is applying a liquid or powder a few shades lighter than your skin on areas you want to bring forward, like the tops of the cheeks and center of the nose. This can make your face look more “glowy.” If you just want to highlight your cheekbones, you could use something matte or shimmery, whereas if you want to sculpt your whole face, including all the highlighted areas in the diagram, a matte product is best. While some people even use concealers, that can look cakey fast due to the high coverage in those formulas.
Contouring is using a powder or cream a shade or two darker than your skin in areas you want to recede, typically the perimeter of the face, cheekbones, jaw, and sides of the nose. This can help to define your cheekbones and make your nose look more narrow.
The best color to use for contouring is strongly dependent on your undertones. If you have very warm undertones, something warm (like a matte bronzer) can work, while a cool-toned or taupey color might pull blueish or purplish on you (you can see this effect in this swatch of NYX Taupe on warm-toned skin, where it looks a bit purplish). If you have very cool undertones, something cool-toned (gray or cool taupe/brown) can work, while a warmer color might look too orangey. If you have more neutral undertones, try a neutral brown like Urban Decay Naked eyeshadow (for light skin) or Kevyn Aucoin’s Sculpting Powder (for light to medium skin).
You can choose to just highlight, just contour, or do both if you like. Regardless, highlighting/contouring products would go on top of foundation. However, in the case of stick or liquid highlighters, you could try putting it on before foundation, then lightly patting your foundation over it, to get a sort of “glow from within.”