Samobor town is entirely walkable. Everything worth seeing — the main square, cake shops, museum, and the start of the castle path — is within a few minutes on foot of wherever the bus drops you. The climb to the castle ruins takes 20–30 minutes from the square; the path is clear and easy to follow.
Trailheads for the Žumberak-Samoborsko Gorje Nature Park are within walking distance of the town edge for the lower trails. For deeper exploration of the park — remote valleys, hilltop villages, longer circuits — a car or taxi gives more flexibility, as public transport into the park is limited.