It really depends. Some directors are hired to execute the producer's vision, some directors are given freedom, some directors even get final cut. In the "huge budget" film genre, producers tend to control directors a lot stronger.
It also depneds on how big you are. Spielberg, Cameron, and many other big name directors usually have a lot of control over their films.