BUT I have no idea where to start with the code
You start with one simple Sketch for each piece of hardware. If you've never written a line of code before, start with the button and an LED. Have the button toggle the state of the LED. Make certain you understand "debouncing".
Then build a second Sketch that sweeps the servo from side to side. Or position the servo at specific angles.
Then a Sketch that takes readings from the compass and outputs them to the serial port.
Even if someone else writes the Sketch for you, it's very likely you will need to perform some adjustments or fix some bugs. You'll need a basic understanding of how the Sketch works to do either of these things.
Some things to consider while building your project...
- What should happen if the boat becomes way off course? How much is "way off course"?
- What should happen in the event of a power failure?
- PID is very likely be a good fit for your project. Have you considered using it?
- How will you know if pushing the button worked? Do you plan to include a display? Or some other visual indicator?