Is this best by train or bus? How long does it take?
The train takes about 2hr 15min cost Euro 30 tourist class.
Check out the Renfe rail website
If the train schedule doesn't work for you, the bus service is fast and efficient, at about 12 or 13 Euro for the run. Check out http://www2.alsa.es/portal/index.asp?lang=en. Remember that in Spain, bus seats are reserved, just like airplanes.
Trains and buses are both good options in Spain. Just choose what suits best based on schedule and price. Usually bus is cheaper. I didn't travel between these two specific cities, but I did go from Sevilla to Granada and then Granada to Madrid, both by bus, and found the experiences to be very good - on time and pleasant. Be aware that there are no bathrooms on the buses. On longer trips, they make a rest stop. They also show movies. Bring food and something to drink. Yeah, seats are reserved; look for your number under the word "Plaza." I thought it meant platform - oops.