Cardiff is the capital of Wales.
When you're coming to Cardiff and get dropped off at a motorway junction on the M4 it's best to go for J32 then walk about half a mile down the A4054 towards Whitchurch and you'll find a train station where you can get to the centre of Cardiff for about £2.
When you're leaving Cardiff, go to J30. Never J32, it's a nightmare, there's no place for cars to stop at all! Get the number 57 or 58 bus and stay on it all the way til the end. Then, walk from the ASDA to the roundabout, turn left, walk up the dual carridgeway to the main roundabout and you'll be able to hitch on the exit roads to the motorway, east or west.