People are always asking about the difference between an AR-15, M4, and M16, so here is a simple answer that should give you ten times simpler, more accurate, and more to-the-point answer than the first article that popped up on google.
AR-15
AR-15 (ArmaLite Rifle) is, or was, a carbine that evolved from the previous model, AR-10. AR-15 is a selective-fire, 5.56×45mm, air-cooled, gas-operated, magazine-fed rifle with a rotating bolt and straight-line recoil design. Eugene Stoner designed it. In 1959, Colt bought the license to produce AR-15 continuing to manufacture the rifle branded as Colt ArmaLite AR-15. Before Colt acquired it, AR-15 was designed above all else to be a lightweight assault rifle and to fire a new lightweight, high-velocity small-caliber cartridge to allow the infantrymen to carry more ammunition.
I don’t know which AR-15 variant from which manufacturer this is, but the thing that matters is the intent for civilian use.

The United States Army adopted the AR-15 after some modifications as the M16. Colt didn’t bury the AR-15 brand, and nowadays, they are semi-automatic modern sporting rifles made for civilians, primarily for recreational shooting.
M16
The M16 rifle, officially designated Rifle, Caliber 5.56 mm, M16, is a United States military adaptation of the Armalite AR-15 rifle. The original M16 was a select-fire, 5.56×45mm rifle with a 20-round magazine. The M4 is newer. It was designed from the M16 to be a shorter model. It’s a carbine version of the longer and heavier M16.

M4
The M4 is newer. It was designed from the M16 to be a shorter model. It’s a carbine version of the longer and heavier M16. The M4 is a 5.56×45mm NATO, air-cooled, direct impingement gas-operated, magazine-fed carbine. It has a 14.5 in (370 mm) barrel and a telescoping stock. The M4 carbine is extensively used by the United States Armed Forces. It essentially replaces the M16 rifle in United States Army and the United States Marine Corps combat units as the primary infantry weapon.
The M4 is capable of firing in semi-automatic and three-round burst modes, while the M4A1 is capable of firing in semi-auto and fully automatic modes.

Conclusion
The Colt M16 and M4 are military rifles, while the AR-15 is a line of semi-automatic weapons for the civilian market. The AR-15 can only fire in semi-automatic mode and is a civilian sporting rifle. The M4 and M16 have selective fire and can fire semi-automatic, full auto, or 3-shot bursts and are considered military rifles that are illegal to own without a special stamp and permit.