You SHOULD book ahead (you can find them on the internet) if they fill up you might not be able to get an excursion if you wait until the last minute. But I have also heard of people just going up to them at the tender pier (drop off point) and just purchase tours there too.
It really depends on the time of year you are going and how many ships will be in port the day you are there. If I were you, I'd visit their website and contact them and ask on how short of a notice you would be able to take a tour.
Carnival Cruise Lines:
Fantasy 90, Celebration 95, Victory 05, Conquest 05, Spirit 6/06, Freedom 6/08, Holiday 7/08, Victory 6/09, Valor 9/09, Dream 6/10, Splendor 8/10,Conquest 8/11,Magic 11/11,Triumph 4/12,Spirit 7/12,Freedom 11/12, Triumph 2/13 - The fire cruise
NCL Dream October 2006, RCCL Mariner OTS June 2007