There is a bus you can take to Ronda from Marbella and back. You can check the full the schedule here: http://www.ctsa-portillo.es/horarios.html
Currently, the bus has the following schedule and takes one hour and five minutes (it´s 45 minutes by car):
Marbella - Ronda 9:20 11:00 (Monday to Friday only) 11:30 14:00 16:35 22:00 (not on Sundays and holidays)
Ronda - Marbella 6:30 (not on Sundays and holidays) 12:00 16:30 17:30 20:00
Double check the schedule on the official Portillo Bus website as it changes according to season: http://www.ctsa-portillo.es/horarios.html
These buses also leave from San Pedro if it´s more convenient for you. The only difference is that the departure from San Pedro to Ronda is 15 minutes later.
If you don´t want to take public transportation you may hire a car a driver, but it will cost you. Premier offers a service that will take you to Ronda with a driver in a Mercedes with four people for 173 euros. If you want the driver to wait and take you on an excursion for 8 hours then it costs 307 euros.
For more prices and information on this service go to: www.limousines-premier.co.uk/rates.htm
Another option, if you´re adventurous enough, is to hike to Ronda. It may take you 13 hours to get to Ronda at a normal pace. It´s recommended that you split the walk in two phases. The first half from San Pedro to Las Conejeras or Quejigales, and the second half from there to Ronda.