Sherri, most often, a ship does stick to its published itinerary. Exceptions would include last-minute substitutions or reroutings due to storms, issues at the port (pier damage, for example), or mechanical issues, all of which are relatively rare. Of these, the least unlikely would be weather-related issues that prevent tendering to a port (such as Grand Cayman or most ships' private islands). There might also be schedule changes a few months prior to sailing, but these are also rare.
If a storm threatens an entire itinerary, you would typically find out at boarding. For example, a Western Caribbean cruise might do an Eastern Caribbean run instead. For one missed port due to weather, you would likely find out while on board, either day of or day prior. For something known in advance, you might learn before sailing, or upon boarding. It depends upon the situation. Again, while this can happen, it is relatively rare. In our 24 cruises, we've had a complete reroute only once, and missed ports only 4 times (two were tender ports, one was due to a damaged pier, and I forget the reason for the other).