The AR-15 (properly, AR15) was made by ArmaLite, and is actually trademarked to (I think) Colt. It is a semi auto rifle. There are many AR15 style rifles, but only ONE AR15. (sort of like bandaid and BandAid Brand)
The M-16 is a selective fire (semi or full auto- or some with 3 rd burst fire) version of the AR. The M4 is the carbine version- shorter barrel, collapsable stock. Semi or tri-burst.
Both the M16 and the TRUE M4 are classed as machineguns, and would have to be registered with the BATFE- but the M4 was introduced after the cutoff date for registering new full autos, so that ain't gonna happen.
You will find lookalikes of the M4 that are semi- but they are not properly a true M4.