How do I inform my immediate boss/supervisor about the offer?
Politely, but firmly. Don't fish for a counter offer. Stay super positive. "I've enjoyed my time here and learned a lot, but it's time for a change." It's not you, it's me. :)
Should I try to negotiate about a matching offer, or should I terminate the contract outright?
Never never never accept a counter offer. Don't even entertain the idea. See @voretaq7's explanation@voretaq7's explanation. Repeat as necessary: "I'm flattered by your counter-offer, but I've decided this transition would be best for me and my career."
How do I inform the team? Do I tell them early on, or right as I'm leaving?
As soon as your supervisor says it's ok to do so. Earlier is better than later. Then connect with them on LinkedIn so you can stay in touch.