You can catch a National Express coach from the Marlborough Street Bus Station in Bristol. The total journey time is 9-12 hours. The first coach departs at 07:30, and the last one is at 11:25 you need to change in Birmingham. There is also a direct overnight service that departs at 20:00. A standard single ticket is approximately 64 GBP, or you can buy a return for 50-80 GBP. After booking online, you will be issued with an e-ticket, which you need to print out and take with you, or an m-ticket, which is sent to your mobile phone. Otherwise you can get at ticket at the bus station.
If you cant find a cheap ticket to Edinburgh try looking at Megabus who operate from various UK cities including Manchester and London to Edinburgh. Journey times will generally be longer but can work out much cheaper if you are on a tight budget. Fares start from as little 1.50 GBP one way for advance online booking! Click the button below to check timetables, routes and prices.
There are two trains an hour from Bristol Temple Meads Station, with an hourly direct service (otherwise you change at Birmingham New Street). The journey should take around 6-7 hours. A standard single ticket is 124 GBP, or you can buy an off peak return for about 132.30 GBP.
The UK train ticketing system is notoriously complicated. It is usually cheaper to buy your tickets up to 6pm on the day before you travel than on the day. And fares are more expensive if you travel before 09:30. You get the best fares by booking up to three months in advance. You can buy your tickets online, at the station ticket counter, or from the ticket machines on the main concourse. If you book online you will need to collect your tickets from the ticket machine using the same credit card you used to book your tickets online.