Supplemental vitamin D comes in two forms: ergocalciferol (vitamin D2) and cholecalciferol (vitamin D3).
They have generally been regarded as equivalent and interchangeable, but that notion is based on studies of rickets prevention in infants conducted seven decades ago.
Recent studies have shown that vitamin D3 is a more potent form of vitamin D. Vitamin D2 has a shorter shelf life, and its metabolites bind with protein poorly, making it less effective. One unit of cod liver oil (containing vitamin D3) has been shown to be as effective as four units of Viosterol (a medicinal preparation of vitamin D2).
However, the form of vitamin D used in prescriptions in North America is almost invariably vitamin D2: http://www.mercola.com/2006/oct/26/beware-of-most-prescription-vitamin-d-supplements.htm.
[The best source of vitamin D is 20 minutes of sunlight daily.]