In the 1950's, the US military adopted the metric system of measurement and uses metric measurements to describe ammo. However, the US commercial ammo market typically used the English "caliber" measurements when describing ammo. "Caliber" is a shorthand way of saying "hundredths (or thousandths) of an inch." For example, a fifty caliber projectile is approximately fifty one-hundredths (.50) of an inch and a 357 caliber projectile is approximately three-hundred and fifty-seven thousandths (.357) of an inch. Dimensionally, 5.56 and .223 ammo are identical, though military 5.56 ammo is typically loaded to higher pressures and velocities than commercial ammo and may, in guns with extremely tight "match" .223 chambers, be unsafe to fire.
The chambers for .223 and 5.56 weapons are not the same either. Though the AR15 design provides an extremely strong action, high pressure signs on the brass and primers, extraction failures and cycling problems may be seen when firing hot 5.56 ammo in .223-chambered rifles. Military M16s and AR15s from Colt, Bushmaster, FN, DPMS, and some others, have the M16-spec chamber and should have no trouble firing hot 5.56 ammunition.
Military M16s have slightly more headspace and have a longer throat area, compared to the SAAMI .223 chamber spec, which was originally designed for bolt-action rifles. Commercial SAAMI-specification .223 chambers have a much shorter throat or leade and less freebore than the military chamber. Shooting 5.56 Mil-Spec ammo in a SAAMI-specification chamber can increase pressure dramatically, up to an additional 15,000 psi or more.
The military chamber is often referred to as a "5.56 NATO" chamber, as that is what is usually stamped on military barrels. Some commercial AR manufacturers use the tighter ".223" (i.e., SAAMI-spec and often labeled ".223" or ".223 Remington") chamber, which provides for increased accuracy but, in self-loading rifles, less cycling reliability, especially with hot-loaded military ammo. A few AR manufacturers use an in-between chamber spec, such as the Wylde chamber. Many mis-mark their barrels too, which further complicates things. You can generally tell what sort of chamber you are dealing with by the markings, if any, on the barrel, but always check with the manufacturer to be sure.
Typical Colt Mil-Spec-type markings: C MP 5.56 NATO 1/7
Typical Bushmaster markings: B MP 5.56 NATO 1/9 HBAR
DPMS marks their barrels ".223", though they actually have 5.56 chambers.
Olympic Arms marks their barrels with "556", with some additionally marked "SS" or "SUM." This marking is used on all barrels, even older barrels that used .223 chambers and current target models that also use .223 chambers. Non-target barrels made since 2001 should have 5.56 chambers.
Armalite typically doesn't mark their barrels. A2 and A4 models had .223 chambers until mid-2001, and have used 5.56 chambers since. The (t) models use .223 match chambers.
Rock River Arms uses the Wylde chamber specs on most rifles, and does not mark their barrels.
Most other AR manufacturers' barrels are unmarked, and chamber dimensions are unknown.
Opinion: In general it is a bad idea to attempt to fire 5.56 rounds (e.g., M193, M855) in .223 chambers, particularly with older rifles.