Please educate me about a detachable laptop

There is a computer waving me trying to be my next one as my current laptop is starting to misbehave.

How do they work ? Where does the operative system resides ? Behind the screen, under the keyboard; or both have hard drives/ssd with the OS ?

I didn't find the right solution

Product Intro Video Example