No advance notice of termination or resignation is required. If advance notice of resignation is given, it can be accepted, rejected, or modified by the employer.
The federal Worker Adjustment and Retraining Notification Act (WARN Act) requires employers to provide 60 days' notice, during which all wages and benefits will continue to flow as usual, giving those who were laid off at least a little time to brace for unemployment, or get busy finding that new (better — knock wood) ...
In the US, companies are not required to give severance packages when doing layoffs. Check your local states' labor laws, as it may differ, but most states simply follow Federal Guidelines and there isn't a Federal requirement.
It makes no difference how long you've been with a company so yes, it's legal to lay off any and everyone without severance. The exceptions: a union agreement requiring severance, a personal contract calling for a severance. This is usually only for executives and ``key'' people.