Abstract: A complete understanding of the formation of the heavy elements at the beginning of the solar system and throughout the cosmos is one of the foremost challenges of modern nuclear astrophysics. The rapid neutron capture process, or r-process, is believed to be responsible for roughly half of the elements above iron and all of the actinides produced in nature. This process is thought to occur during the merger of compact objects and rare supernovae. To understand this complex process requires detailed modeling of astrophysical objects, multi-messenger observations, theoretical description of relevant nuclear processes, as well as precision nuclear experiments. I will discuss the latest advances in these topics in the context of the r-process. Particular focus will be given to the interplay between theoretical modeling of nuclear physics inputs and measurements that will ultimately transform our understanding of neutron-rich nuclei and their role in the formation of the heaviest elements.