A flight plan is just that, a plan. A flight can deviate from its cleared route for many reasons, the most common of which are:
Weather reroutes are often initiated by the crew.
Center, N12345 request 15 right for weather
N12345 15 right approved for 100 nm, report direct XYZ.
Or they can be initiated by ATC
N12345, Atlanta, your arrival into EWR is in perpetual holding, I can re-route you over PA or NY or do you need to divert? state intentions.
Large scale re-routing for weather will occur when an organized line of convection impacts a major route. Even a short deviation for weather may result in an amended route if the controller has an alternate clearance he can put you on that works for you (being on a clearance and on-route is slightly less work for a controller than being on a carte-blanche deviation).
Traffic conflicts are usually short term vectors, but if you have an aircraft slowly overtaking you, you may be moved to a parallel route or have you altitude changed. These, like the weather example above, would result in amended clearances.
Shortcuts are often requested to cut corners or try to make up some time lost in a long taxi on the ground. These are usually crew initiated, but sometimes ATC will solicit them. Regardless of what route is submitted in a flight plan, ATC will generally clear you via a preferred routing. These routes aren't always the shortest distance between a departure and arrival and this is where shortcuts can be requested. Usually this just means skipping a fix or getting direct routing to a later fix in your clearance. The availability of shortcuts is a function of traffic, time of day, agreements between ATC sectors, what region you are in and what altitude you are at.
When you are on international flights, another issue you may run into is political and could result in some or all aircraft being routed to avoid certain airspace.
Lastly, your dispatcher may re-route you and ATC will clear you along a new route.
In all cases, whether deviation is pilot or controller initiated, both parties are in sync with what the airplane is doing, which will either be a vector or a new clearance. Your dispatcher will be notified of this change automatically via their dispatch software (which is likely fed data from both ACARS and the FAA).