Assuming you're flying out of SJO, and that you only have a couple of days. That narrows it down to the San Jose area unless you feel like moving the whole time. Just do some research
on trip advisor or lonely planet and find some things you like to do there. Costa Rica is well known for its national parks and rainforests with lots of biodiversity, lots of elevation changes and it can be cold. I've never actually spent a night in San Jose, usually staying on friends farms near cartago, atenas or cobano. Cattle ranches, coffee, bananas etc
Cobano, and the nicoyan peninsula is pretty sweet. We drive for miles along open pacific beaches well into guanacaste.
If you don't feel confident renting
a car, check out some excursions you can buy into from SJO. If you're sailing the Caribbean
you may want to make a point to check out one if the closer pacific beaches. If you rent a car, make sure it is 4wd if you're feeling adventurous. Sucks to be stuck on the beach at low tide in a rental
The seafood is good, and I could crush some rice and beans with a couple fried eggs and salsa luziano, or a big bowl of ceviche.
Have a good trip