You should probably just read the wikipedia article on Diploma Mills in the US. Here's my short summary.
There are a few legally protected titles in some states. For instance, you can't call yourself a Doctor, Lawyer, or Professional Engineer in Michigan without having passed the relevant licensing tests and have obtained a degree from an accredited educational program.
This essentially forms a chain of trust. For a profession engineer, the state requires you obtain an NCEES license, they perform testing and also require an educational degree from an accredited institution, and they only trust a handful of accrediting agencies.
One accreditation list is maintained by the US Department of Education.
For instance, the University of Michigan is accredited by an organization that the US Department of Education trusts - the North Central Association of Colleges and Schools, The Higher Learning Commission.
Thus there is a chain of trust.
Diploma mills come in two types, accredited and unaccredited. The accredited diploma mills get their accreditation from fake or otherwise invalid accreditation agencies.
The unaccredited diploma mills simply call themselves schools and claim authority to hand out degrees.
There are no federal laws that would unambiguously prohibit diploma mills, and the terms "university", "college", etc are not protected so anyone can use them for any purpose.
Some states have fairly tough laws that prevent diploma mills from claiming that state as their home, requiring accreditation from an institution recognized by the US Department of Education, for instance, before being able to award educational degrees.
This is not universal, though, so you end up with diploma mills setting up in states that do not have such protections. This helped initially, but then the internet became very popular, and diploma mills started extending their reach more aggressively outside their states.
In states where such mills are illegal, sometimes the degrees and use of them to promote yourself is also illegal. However it appears that these laws may be unconstitutional.
Conclusion
- If you award fake diplomas, you can be prosecuted in some states.
- If you promote yourself using a fake diploma you are unlikely to be prosecuted, but there are laws under which you could be prosecuted.
- If you use legally protected terms requiring license in your state, such as doctor, lawyer, professional engineer, etc, you may be prosecuted under state laws.