Hi Ally2069,
I'm not a scientist, so won't go into detail, there is lots of information online, written by people who can explain it better than me. :-)
In a nutshell, in ketosis - through restricted carb intake, the body uses it's fat stores for energy, hence the rapid weightloss. And...