Boyle in 1662 found a relationship between the pressure of a gas and the volume it occupies. For a fixed amount of gas at constant temperature, he observed that the product of pressure and volume remained constant:

If we graphically represent the product PV against P, it is observed that Boyle's law only holds at low pressures (the curve is horizontal). At high pressures the deviation with respect to Boyle are very important.
Therefore, Boyle's law holds for gases that behave ideally (low pressure conditions).