A domain registrar is an ICANN-accredited company through which you register and buy domain names. It acts as the middleman between you and the registry that keeps the master list for a given zone.
When you take out a name, the registrar passes the record to the registry of the chosen top-level domain and assigns the domain to you. It also stores the owner's contact details that end up in WHOIS, and lets you set the NS servers — that is, choose which DNS will serve your zone.
From the registrar's dashboard you usually handle the main tasks around a domain:
Don't confuse the roles: the registry runs the whole zone, while the registrar is the storefront through which a specific name is registered and maintained.