If you are an “at-will” employee, then you may quit your job at any time for any reason and you may be fired without any cause or reason.  
 
You can change the at-will status of the employment if you and your company sign an employment agreement which modifies the at-will(ness) of your job.  Example –  “company hires you for 1 year and you may only be fired if you fail to perform your main job duties and the company gives you two warnings which you fail to comply.”
 
Employers – there are some exceptions to this “at-will” general rule. Seek advice and be careful how this is handled.  Please be kind to your exiting employee and treat them as good as possible.
 
Employees – there are right ways to handle leaving your job.  Please treat your soon-to-be ex-company kindly and with grace. After all, your old company may be a good referral for you.