Giving a proper notice is one of the ways to quit a job professionally. Also, first, tell your manager in person or by call, then submit a short resignation letter, finish handing over your work, and stay polite and respectful so that you leave on good terms and keep future references intact.