Bath is a city in England.
North/West/East towards London, Cardiff, Bristol
Head to London Road and walk all the way down it until the roundabout. There isn't really any place for cars to pull in (no layby) but walk down a little and cars will be able to see you and pull in if they desire. From this Roundabout you will get a lift to Junction 18 of the M4 - the motorway onramps (East or West) have plenty of space for vehicles to pull over. Using a sign here could take you a long distance in either direction (including North up the M5).
South-East towards Trowbridge, Warminster, Salisbury
Walk to the start of Warminster Road, which is the A36 going out of Bath (past Sydney Gardens). On the left of this uphill road there is a place for cars to pull in. Wait times can vary but rides will often be going long distances down the A36. Also a good spot if hitching to Stonehenge.
Coming from London / the west, there is a junction that heads to Bath with a layby just past the roundabout. Head there. You should get a ride pretty snappy.
Places to avoid
Accommodation and Sleep
Bath has spectacular countryside and it should be quite easy to camp out once walking out of the city in any direction (half an hour from the centre, more or less).