The discovery of thousands of planets since 1995 has transformed how we perceive our place in this universe. One of the most profound findings since is the unexpected dearth of close-in planets of sizes 1.5 to 2.0 Earth radii, i.e., a radius valley. This valley divides the population of the most abundant class of planets yet known, those between the sizes of Earth and Neptune, into (1) super-Earths: planets smaller than 1.5 Earth radii with rocky, Earth-like bulk compositions, and (2) sub-Neptunes: planets larger than 2 Earth radii with hydrogen-rich atmospheres or interiors with substantial amounts of ices.The origin of the radius valley is typically attributed to atmospheric escape due to photoevaporation. Through this work, we have demonstrated that atmospheric mass-loss driven by the cooling luminosity of a planet and its host star's bolometric luminosity, i.e., the core-powered mass-loss mechanism, can also explain this observation, even in the absence of any other process. In a nutshell, our work shows that the typical observed exoplanet has an Earth-like interior composition and accreted a hydrogen atmosphere from the protoplanetary disk. However, over millions to billions of years, some planets lost their atmospheres because of core-powered mass-loss and transformed into super-Earths. In contrast, those that survived with their primordial atmospheres are today's sub-Neptunes.For this work, we used analytical theory and numerical simulations to model a planet's thermal evolution and atmospheric escape and explored the impact of this mechanism on planet demographics. We find that the core-powered mass-loss mechanism explains not just the bimodality in planet sizes but even the numerous trends observed in the planet demographics across various planetary and host star properties. For instance, we find that in the planet size-orbital period space, the radius valley slope is -0.11 across FGKM dwarfs, which is in excellent agreement with observations. In addition, my work gives several insights into the nature of these planets. As an example, we find that most close-in super-Earths and sub-Neptunes formed with hydrogen envelopes. This finding has major implications for the chemical evolution of their atmospheres. Finally, we also seek testable predictions of the core-powered mass-loss theory. For example, we predict that the slope of the radius valley decreases in magnitude in the planet size-stellar mass space as the stellar mass decreases from 1 to 0.1 Solar masses. In the same vein, with my collaborators, we find that a powerful diagnostic to distinguish between the signatures of core-powered mass-loss and photoevaporation is to explore the radius valley in the three-dimensional phase space of planet size-stellar mass insolation flux. Many of these tests are being employed today by observational studies. One of our significant findings, also corroborated by other contemporary theoretical and observational studies, is that most observed exoplanets have hydrogen atmospheres interacting with molten or super-critical interiors for millions to billions of years. In our Solar system, we see this for planets such as Jupiter and Neptune. Studies show that such interactions can have far-reaching implications for an atmosphere's composition, structure, and evolution. However, we hardly understand these interactions, and studying them in a laboratory is difficult. The last chapter presents a novel method to address this problem via computational experiments based on density functional theory molecular dynamics. Specifically, we examined how hydrogen and water interact under conditions similar to those found in planets such as Uranus and Neptune. We determined their phase diagram, which is in good agreement with laboratory experiments. Our findings indicate that planets like Neptune and Uranus have regions where hydrogen and water are thoroughly mixed, as well as regions of compositional gradients. We identify the pressure depths where these compositional changes likely happen in Uranus and Neptune and find that these locations are strongly correlated with the variations in observationally constrained density-pressure profiles of these planets. Furthermore, our results help elucidate the physical and chemical processes responsible for Neptune's higher internal heat flux compared to Uranus. We find that this difference in heat flux can be attributed to a higher degree of water-hydrogen demixing in Neptune's interior which would have led to the release of larger amounts of gravitational energy. Additionally, we identified regions where the magnetic fields of these planets are likely generated and discussed how their different magnitudes are also a possible by-product of hydrogen-water mixing properties. Our results highlight the importance of understanding the interaction between the fundamental building materials of planets if we want to develop a comprehensive understanding of how planets, in our Solar system and beyond, form and evolve.