A milligram measures mass while a milliliter measures volume. Mass relates to weight, or the amount of matter in a thing, while volume is how much space a substance takes up. This comparison is similar to comparing a pound (weight) to a cup (volume).
A milligram is 1,000th of a gram or 1,000,000th of a kilogram. In the metric system, each type of measurement has a basic unit. Usually, it is the unit without a prefix (such as the meter for length), but in the case of mass, it is the kilogram. For volume, the basic unit is the liter, though sometimes cubic meters are used instead. Volume is measured by multiplying length times width times height, so a cubic meter is a meter cubed (a meter times a meter times a meter).
Generally, a person cannot make a conversion between these two units. To make a conversion, the density of what is being weighed must be known. Density is how tightly packed molecules are in a certain substance. For instance, water expands when it floats, which is why ice floats in water. Therefore, water that has the same mass can take up more space if it is frozen, meaning it takes up more milliliters. In fact, density is often measured in grams per cubic meter.