The experimental collaborations at the Relativistic Heavy Ion Collider (RHIC) have established that dense nuclear matter with partonic degrees of freedom is formed in collisions of heavy nuclei at 200 GeV. Information from heavy quarks has given significant insight into the dynamics of this matter. Charm and bottom quarks are dominantly produced by gluon fusion in the early stages of the collision, and thus experience the complete evolution of the medium. The production baseline measured in p + p collisions can be described by fixed order plus next to leading log perturbative QCD calculations within uncertainties. In central Au+Au collisions, suppression has been measured relative to the yield in p + p scaled by the number of nucleon-nucleon collisions, indicating a significant energy loss by heavy quarks in the medium. The large elliptic flow amplitude v2 provides evidence that the heavy quarks flow along with the lighter partons. The suppression and elliptic flow of these quarks are in qualitative agreement with calculations based on Langevin transport models that imply a viscosity to entropy density ratio close to the conjectured quantum lower bound of 1/4Π. However, a full understanding of these phenomena requires measurements of cold nuclear matter (CNM) effects, which should be present in Au+Au collisions but are difficult to distinguish experimentally from effects due to interactions with the medium. This thesis presents measurements of electrons at midrapidity from the decays of heavy quarks produced in d+Au collisions at RHIC. A significant enhancement of these electrons is seen at a transverse momentum below 5 GeV/c, indicating strong CNM effects on charm quarks that are not present for lighter quarks. A simple model of CNM effects in Au+Au collisions suggests that the level of suppression in the hot nuclear medium is comparable for all quark flavors.