Many of them are partial transits. They go through the first set of locks (Gatun) to Lake Gatun, then go back out the same way. The full transits go all the way through the second set of locks as well, all the way to Panama City. Look at the itineraries of the cruises you're interested in ....it should tell you exactly how far in they'll be going.
If you do a partial transit cruise, you may be able to do an excursion at Lake Gatun which will bring you ashore to take a bus to Panama City for the day. You'd take that bus back from Panama City to Colon or Limon where you'd get back on the ship and continue your cruising.
Hope this helps 😊