Granada to Cordoba works equally well on bus or train. It's not a high speed line, so there isn't a huge time savings on the train like there would be on other routes. The bus has more departures so you'd have more flexibility on times. Schedules for August aren't out yet, but on the train on a random day in March it is 2hours20minutes (give or take) and there are three - 6:45 AM, 8:30 AM and 6:50PM. The ALSA bus has 6 departures, including afternoon and later evening, but takes 2h45min or 3+hours. I've taken the bus because of the timing and it was pleasant.
In Cordoba, the main bus station is right across from the main train station. The ALSA bus goes to this station, and the train would go to the train station across the street. Both are fairly close to the center - I have walked, or it would be a short cab or local bus.
In Granada, the bus station is out farther - you will need a cab or local bus to get to the center. The train station is closer.
In both cases, just look up "Cordoba bus station" etc - as far as I know both cities only have one bus and one train station each.