When I've had to leave positions, I tell my supervisors in person first, and give them a letter a few days later. You can find examples of letters online - be sure it's professional, positive, honest, and well written. It'll go in your file for sure! Also, I try to give at least one month's notice, in general, and whenever possible time it so that it's between seasons or at least shows.
And when you're living through the "lame duck" period between your announcement and your last day, do the best work you've ever done. I usually keep very quiet about my departure until a day or two before I go, certainly letting everyone know but just not, you know, talking about it a lot. Tie up as many loose ends as you can, get your desk tidier than it ever was before, start jotting down notes you think the next person might need to have, and keep in touch with colleagues about the status of your projects so that someone will have all those helpful tidbits of info that were floating around in your head. I usually grab my supervisor for a quick exit interview - even if they do not initiate it - so that I can be sure they know about my initiatives and observations for the next person that comes in. (I mean, the kind of stuff that comes with the hands-on experience - who's great, who's a problem, general long-term projects, big dreams and ideas, little thorns in your side... just so they have some awareness. If someone comes next season and says "Steve builds props that always break immediately," this won't be the first time anyone's mentioned something about Steve's performance.)
If a kind and well-wishing coworker wants to pull together the "goodbye party," let them, but insist that it be small. Go, enjoy yourself, drink and be merry but do not get blasted and say things you really should never have said. But you should let them throw a little shin-dig for you.
Very best wishes!