Theyre taxed, expensive due to supply and demand, the newest ones that are legal for civilians to own are more than 30 years old, and the paperwork is onerous to get one, but theyre not illegal. At least not in most states.
For most practical purposes, automatics are illegal.
The 2nd was intended that today you could buy an M4 (standard US military rifle). You can’t.