Replace mode prevents you from drawing new stuff, and old things will be replaced. If you CTRL + ALT + click an element, then replace mode will only replace that element with what you are drawing and no other kind of element.
Caps lock makes everything you click be erased if the element you have selected with CTRL + ALT + click (light blue outline) is erase. If you select something else with the light blue element, then only that element will be erased when you click it and no other kind of element.