Out of politeness verbally give notice at the same time had over written notice. Writing is always preferable so you have evidence of dates etc should anything go wrong but a nice conversation with YO to warn them or to discuss it is a good thing.
Although it's a bit scary and you probably feel like your letting someone down, it's best to tell them verbally. I had to do this recently at a yard i'd been at for 22 years, it took me weeks to build up the courage!
Verbally and then in writing. Probably a good idea to quote the relevant bit of your livery contract in the letter. That letter is your proof, should anything go wrong.
I think in writing is most professional. Although you could perhaps give them a hint or a heads up verbally first to lessen the shock. I hated handing my resignation in a few months ago, I did cry because I felt so bad about it!