HDR has two ATMs in the lobby/casino area. The one near the elevator spits out Colones. The one near the front desk, Dollars. Fair exchange rate. The Colonial Casino next door has a good ATM in the back of the casino for Colones. I have found these ATMs to be very convenient for me. Inside and secure (if there is such a thing in S.J.

)
Most banks have ATMs which will give you your choice of Colones or Dollars. Banks are likely to have the best exchange rate but unless you are getting a small fortune in cash, I wouldn't sweat it too much.
I would not recommend using outside ATMs after dark.
If you want to trade Dollars for Colone, a bank would be your best bet. Take your passport.