The properties of the hot and dense nuclear matter produced at RHIC in heavy-ion collisions can be investigated in multiple ways by heavy flavor production. The STAR and PHENIX experiments have excellent capability to study both open heavy flavor and quarkonia. Heavy quarks are produced in early stage of the collisions and the mechanisms of their interaction with nuclear matter are not yet well understood. The open heavy flavor hadrons can be studied using electrons from their semileptonic decays or via direct reconstruction through their hadronic decay channels. The heavy quarkonia production is expected to be sequentially suppressed depending on the temperature of the produced nuclear matter. However, cold nuclear matter effects play an i...