It is hard enough to exactly aim a rocket when you know all the forces on it, but on a long journey there must be any number of minor gravitational attractions to rocks and other mass in space, and the effects must add up considerably over millions of miles.
My assumption is that adjustments must be made based on comparing actual position to estimated position, and correcting accordingly.
The first "deep space maneuver" occurred last Thursday, Aug. 30, more than 300 million miles from home, to begin fine-tuning the craft's course to intercept Earth. The Leros-1b main engine was fired for 29 minutes and 39 seconds, changing Juno's velocity by about 770 mph while consuming around 829 pounds of fuel.
So how often does this measurement need to be done, and how is it done? Triangulation from known stars?