This article provides a review on the covariant density functional theory (CDFT) in nuclear physics, and its applications for nuclear ground-states and excited states, as well as a couple of topics in interdisciplinary ?elds. By reviewing the development milestones in nuclear physics, the hot topics and important issues, as well as the corresponding opportunities and challenges in the twenty-first century are introduced. The nuclear CDFT is then presented in detail, including the general formalism, meson-exchange models, point-coupling models, exchange terms, tensor interactions, and physical observable, etc. The successes of the CDFT are illustrated by the descriptions of a series of nuclear ground-states and excited states properties, as well as its applications in astrophysics and the Standard Model. The ground-states properties include the nuclear binding energies, radii, single-particle spectra, resonance states, halo phenomena, and magnetic moments. The excited states properties include the nuclear magnetic rotation, low-lying excitations, shape phase transitions, and collective vibrations. The applications of the nuclear CDFT in interdisciplinary fields are demonstrated by the investigations on the nucleocosmochronology and the unitarity condition of the Cabibbo-Kobayashi-Maskawa matrix.