Places not listed online are usually the cheapest.
Budget accommodation is often concentrated in one part of the city. Find out where it is and make a small tour of the guesthouses. If you're not happy with the price or with the room, see the place next door.
If you have no idea where to find accommodation, try looking around bus or train stations. Small restaurants sometimes have a room for rent, or may know someone who does.
Take overnight trains and buses to save money on accommodation.
Camping
In some countries you're only allowed to camp at designated campsites.
If you don't know if you're allowed to camp, make sure you're not in plain sight. Wake up and leave before dawn.
In the countryside, try asking farmers if they mind you camping in their field.
Be very careful with campfires and avoid them altogether during drought. If you're camping illegally, a campfire is definitely a bad idea.
Clean up after yourself and leave no trace.
Don't use any shampoo or soap to wash yourself in nature. Use sand or grass or leaves to wash dishes.
Don't shit near freshwater. Dig a hole and bury it or use public toilets.