A dimer is a molecule composed of two subunits linked together. It is a special case of a polymer. Among the most common dimers are certain types of sugar; sucrose, for example, is a dimer of a glucose molecule and a fructose molecule.
In biology, a dimer is a protein complex made up of two subunits. In a homodimer the two subunits are identical, and in a heterodimer they differ (though they are often still very similar in structure). The subunits do not need to be covalently linked, and usually aren't.