The main tenant (Hauptmieter) is the person who is responsible for paying the rent to the landlord. The Hauptmieter can sublet the apartment with the permission of the landlord.
The Hauptmieter can be the Wohnungsgeber and sign the Wohnungsgeberbestätigung. You need this document to register your address.