When you heat up a liquid at constant volume (leaving sufficient space for the gas phase), the density of the liquid will decrease and the intermolecular interactions will weaken. Some of the liquid will transition to vapor, so the vapor above the liquid will get denser and the frequency of intermolecular interactions will get strongerincrease (lessit behaves less and less as an ideal gas as the densitynumber of collisions increases with increasing density). At the point where the density of the liquid and the gas are the same, there is no more phase boundary (with gravity, we picture liquid on the bottom and gas on the top, but if the density is identical, that is no longer the case).
This is all pretty outlandish for most of us because we are used to constant pressure, not constant volume. Here are two videos showing the process:
Liquid chlorine: Here, it looks like the liquid level stays constant - the expansion of the liquid and the evaporation balance each other out. If you look carefully, though, you can see how the vapor phase color gets more intense, indicating more molecules in the vapor phase. At the same time, the color of the liquid gets less intense, indicating a decrease in density. https://chem.libretexts.org/Courses/University_of_North_Texas/UNT%3A_CHEM_1410_-_General_Chemistry_for_Science_Majors_I/Text/10%3A_Solids%2C_Liquids_and_Solutions/10.13%3A_Critical_Temperature_and_Pressure
Carbon dioxide: When approaching the critical point, the system gets turbid because the difference in density between liquid and gas is no longer sufficient to keep the liquid down and the vapor up. The system is a heterogeneous mixture of liquid and vapor for a while, and then a single pure phase.
https://www.youtube.com/watch?v=GEr3NxsPTOA
Making of video: https://www.youtube.com/watch?v=-gCTKteN5Y4