One milligram is exactly 1,000 micrograms. It is a routine decimal shift with an unusual amount at stake: this is the boundary where medication errors most often happen, and hospital guidance around the world specifically addresses how to write it.
About the units
Both units are the gram with a prefix: milli is a thousandth, micro is a millionth, from the Greek mikros. The microgram is written µg with the Greek letter mu, and that symbol is the source of much of the trouble. Handwritten, µg is easily mistaken for mg, and the resulting error is a thousandfold overdose. For that reason many health systems require the word "microgram" to be written out in full on prescriptions and never abbreviated, and the older abbreviation "mcg" persists in American practice specifically because it cannot be confused with mg by a tired reader.
The exact factor
The factor is exactly 1,000: shift the decimal three places. 0.5 mg is 500 µg; 250 µg is 0.25 mg. The safety rule that follows from the arithmetic is to avoid decimals below one wherever possible. A dose of 0.125 mg is better written as 125 µg, because a lost decimal point in the first form gives 125 mg, a thousand times the intended amount, while the second form has no decimal to lose. The same logic applies one step further down to the nanogram, a thousandth of a microgram.
Where you meet this conversion
Pharmacology throughout. Levothyroxine, digoxin, fentanyl and most hormones are dosed in micrograms while the tablets around them are labelled in milligrams. Vitamin content on nutrition labels crosses the same boundary — vitamin D in micrograms, vitamin C in milligrams, on the same panel. Toxicology and environmental monitoring report concentrations in micrograms per cubic metre or per litre, where an error of one prefix turns a safe reading into an alarming one. Analytical chemistry works routinely at both scales.