A matter can be in three (main) different phases: solid phase, liquid phase, and gas phase.
In solids, the atoms at at fixed positions, they cannot move through the whole volume of solid. At a results solids have well defined shape and volume.
In liquids, the atoms can move through the whole volume, but the distance between the atoms is small and the interactions between the atoms is strong. Due to this property, the liquids have well defined volume but not shape.
In gases, the atoms (or molecules) can move through the whole volume, which is similar to liquids. The difference from liquids is that the distance between the atoms (molecule) in gases is large - much larer than in liquid. As a results the interactions between the atoms is very weak. Due to this property, the gases do not have well defined volume: they occupy the whole volume of container.
Since the distance between the atoms (or molecules) in gases is relatively large, then it is reasonable to introduced definition of so called ideal gas.
Ideal gas is the gas of atoms (molecules) without inter-atom (inter-molecule) interactions. Thus the atoms in the ideal gas do not interact with each other.
Without interaction between the atoms, one can derive simple ideal gas law (equation of state of ideal gas), simple expression for thermal energy (internal energy) of ideal gas.
Below you will find animations of different concepts related to ideal gas.