Try and picture it. If you add heat and lower pressure, the molecules have more movement and more room to move in (gas). If you remove heat and increase pressure the molecules are less mobile and get closer and closer together (solid).
Since it neglects both molecular size and intermolecular attractions, the ideal gas law is most accurate for monoatomic gases at high temperatures and low pressures. The neglect of molecular size becomes less important for larger volumes, i.e., for lower pressures. The relative importance of intermolecular attractions diminishes with increasing thermal kinetic energy i.e., with increasing temperatures