If you want to refer to a cell absolutely, you type $A$1 instead of A1. This means that if you drag down the cell or drag it over, that it doesn't change to A2 or B1.
Let's say, though, that you realize you need to switch from absolute references to relative, or vice versa. You could laboriously retype everything. However, there’s a quicker way. To switch from relative to absolute or vice versa, select the cells containing the formulas and press Shift F4. You’ll see in the illustrations how it cycles through.