How exactly does namecoin work on "low" level? I know a bit about "low level" of bitcoin (transactions, blockchaon, script, network instructions...).

Now I want to read something about namecoin and all the online sources are very vague.

So, I have a question: how does namecoin work on the "low level"? how does it actually save the "domain"? how does it expire it? how can I move the domain to someone else? 

I understand that it does it somehow by key value pairs stored in blockchain somehow - where exactly?
I'm not an expert on Namecoin, but from what I understand, Namecoin works by introducing a few new types of transactions to the Bitcoin formula used for handling domain registration. After that you just need some mechanism of extracting the domain names from the blockchain and that should be enough for Namecoin to work.