Atomic physics question - exciting of electrons during bonding

As I have learnt, when bonding takes place in an atom, such as carbon, the electron in its $s$-subshell gets excited and jumps to the open spot in the $p$-subshell. This is why carbon is able to form 4 bonds, rather than just two. My question is, when the electron jumps into the higher position shell, why does it change its spin? And also, how does it change its spin?