Milligram (mg)
A milligram is one thousandth of a gram, and it measures how much of a substance there is.
Milligrams measure mass — the quantity of the compound itself, with no reference to any liquid it might be dissolved in. A vial labelled 10 mg contains ten milligrams of powder regardless of what you later add to it.
Because the amounts involved here are small, you will constantly see milligrams alongside micrograms, which are a thousand times smaller. Keeping the unit attached to every number you write down is the single cheapest habit for avoiding a serious error.
For example
A vial marked 5 mg holds five milligrams of compound. With 1 mL of liquid added, or with 3 mL, it still holds five milligrams. Only the concentration changes.
What it is not
A milligram is not a millilitre. One measures substance, the other measures liquid, and they are abbreviated confusingly similarly (mg and mL). They are not interchangeable and no conversion exists between them without knowing a concentration.
Where this comes up: reconstitution