How do companies like Skype get phone numbers to rent/license them to the public?

And does any one or entity "own" these numbers?

Like if you get a number from Skype, can you port it to another company like Ooma for example? Or do you have to buy the number from Skype first. I don't mean the annual Skype fee, I mean do you have to buy it so you "own" it fully with no strings attached to anyone.

How does all this work. Any one know?

Thx,
S