If you want to experience something of the real life of Cubans, the best places to stay are casas particulares (private houses licensed to offer lodging services to foreigners). They are cheaper than hotels (average CUC 20/room) and the food (breakfast CUC 3-4, dinner CUC 7-10) is almost always better than you would get in a hotel. Casas particulares are plentiful even in small towns; they are somewhat more expensive in Havana than elsewhere. Note that any service offered by a casa particular other than accommodation, such as driving you to the bus station, will be added to your bill, regardless of whether this is stated up front. Items such as bottled water supplied with your meal will also have a charge. Always make sure that you talk to the owner about what things will cost when you arrive to avoid unpleasant surprises later. These houses are under a lot of restrictions by the government, so make sure that you are staying at a legal "casa". A legal house will have a sticker on the front door (often a blue sign on a white background), you will notice these as you walk past houses. Upon arrival, the houseowner will need to take down your passport details and how long you will be staying for. Some Cubans do offer illegal accommodation and although they are cheaper, the quality of the food and service is generally lower. If found, the Cubans will risk a large fine and it is best to avoid illegal casas completely. If travelling around the island, it is recommended to ask the casa owners if they have friends or family in the city you are going to. There is a network of casas and the family will gladly organise for you to be met by their friends off the bus at your next destination.
If travelling by bus, you will be accosted by jineteros (hustlers) trying to lead you to a casa, where they will get a commission and you will be charged the extra. For the best rates, arrange your accommodation in advance, either by asking your host to recommend someone or by using a casa particular association (note, however, that the party making the introduction will almost always receive a commission, which you end up paying as it will be included in the accommodation price). Some will let you book accommodation over the internet before your trip, and will go out of their way to arrange accommodation for you while you are there.
Most small cities and larger towns have at least one state-run hotel, which is often in a restored colonial building. The prices range from around CUC 25 to CUC 100, depending on what you are getting. Resorts and high-end Havana hotels can be significantly more expensive.
Cubans hosting foreigners for free is technically illegal and risk a large fine if caught. Some will bend the rules, but be cautious if you choose to take up the offer (e.g. don't walk out the front door if you see a police car nearby, especially if you look obviously foreign).