It depends on the relationship with your supervisor/company. If you are cool with your boss or respect the company, tell him/her first in person and they will let you know what you need to do afterwards. There are some managers who know the deal that this is only a business and you have to do what is best for you first. Plus, you can use them as a reference in the future or if shyt doesn't work out, you can see if you can come back to your old job. I know plenty of people who left their old jobs and had to come back because things didn't work out with the new gig.
Now if you hate your boss or have no desire to come back, still tell the manager first just to be professional and then send an official email to them. Some companies may just let you go that day and still give you two weeks pay. It all depends on corporate policy. Don't be an ass on the last two weeks because you may never know who you will run into in the future. Hope that this helps.
Now if you hate your boss or have no desire to come back, still tell the manager first just to be professional and then send an official email to them. Some companies may just let you go that day and still give you two weeks pay. It all depends on corporate policy. Don't be an ass on the last two weeks because you may never know who you will run into in the future. Hope that this helps.

:

