You pay a yearly fee for the domain name. That amount varies (sometimes HUGELY) depending on registrar. You will always need to renew your basic license to use such-and-such.com before the expiry date with the registrar....
I don't know of anywhere to "buy" a domain "in perpetuity" - in other words, I'm not personally aware of any registrar who will sell you rights to any given domain name "forever" - so no, you actually don't "buy" outright a domain name; in essence, you rent or lease it.