We went from Valladolid to Penafiel by bus. It took about an hour and it costed 3,65 euros (one way). In Valladolid the bus leaves from the bus station (u can buy the ticket inside the station) and in Penafiel it arrives in the centre of the village (it's quite far from the castle, but if you don't have problems walking it takes half an hour).
To come back to Valladolid you'll take the bus in the same place where you arrived and you'll buy the tickets on the bus.
When I took the buses to and from Penafiel, they were always on time
How to get to the castle
On weekends that is much busier you have to leave the car at the parking lot and a bus takes you up to the castle. On the top they will have space for less than 50 cars.
If you decide to walk up be careful with the bends (and the drivers)
Peñafiel is placed in the road between Valladolid & Zaragoza (or Valladolid-Barcelone), around 1 hour from Valladolid. The road is being transformed now in highway. It is also very near from the A-I, the Madrid-France highway.