if you would like to stay onboard while the ship is in port, you are free to do so - quite a few people opt for this. Additionally, the excursions offered are fully voluntary so if you don't want to participate in any of them, that's perfectly fine.
Yes, indeed, the ship will usually be less crowded while in port in comparison with days at sea. Most facilities will be open, but both shops and the casino will be closed.
In regards to possibilities to enjoy the ports of call on your own, make sure to visit this site
Have a great cruise!