A pointer holds the address of another variable. &x gives the address of x, and a variable declared int *p = &x; holds it. Writing *p reads or writes the int the pointer points at, so *p = 5; changes x.
C passes arguments by value: a function gets copies, and changing a parameter changes only the copy. To let a function change the caller's variable, pass its address and write through the pointer. This is how C functions return more than one result, through out-parameters, and it is why scanf needs &.
The usual mistakes are changing the pointer instead of what it points at (p = q instead of *p = *q) and losing a value while swapping because it was overwritten first.