The registrant searches for an available name, pays the registrar's fee, and receives the registration for one or more years; price varies by TLD.
The process starts with an availability search at the registrar. If the name is free, the registrant pays the annual fee (which varies by TLD and registrar) and the domain is created at the registry [1]. Primary market prices are usually much lower than secondary ones, but the name has no traffic or history. Registrars compete on price and add-on services.