Heavy flavor production is a sensitive probe of the initial gluon density in the nucleon and is modified by the entire evolution of the hot quark and gluon medium created in high-energy nucleus–nucleus collisions. Besides, it is a process that can be calculated by perturbative QCD because of their large mass. The PHENIX experiment at RHIC studied the heavy flavor productions for a broad momentum and rapidity ranges using single leptons from the semileptonic decay of charm and bottom hadrons, and dileptons from J/ψ decays in p+p, p+A, and Au+Au collisions at √sNN=200GeV. In these proceedings, the recent experimental results in p+p, Au+Au, and the small collision systems are presented and the heavy flavor productions and their modifications are discussed.