Which office handles it depends on the country's system: some route foreigner registration through local police stations, others through a dedicated foreigners' registration office, immigration department branch, or the municipal town hall, and a growing number allow or require online filing. When staying at hotels, the front desk files for you, which is why the in-person process mainly concerns people in private homes or on long stays.
The document list is remarkably consistent across countries: passport with the entry stamp or visa, completed registration form, proof of address such as a rental contract, utility bill, or a letter from your host, and passport photos in some systems. Hosts sometimes must appear or sign, and a few countries put the filing obligation on the host rather than the guest. Bring photocopies of everything, since registration offices worldwide share a love of copies.
Expect the visit to be bureaucratic but routine, and keep the stamped registration slip or certificate safely with your passport, because it can be requested at visa renewals, when opening bank accounts, and occasionally at departure. Check the immigration authority's site or your embassy's country page for the exact office and current requirements, since these systems get reorganized frequently.