An ideal gas is a picture of a gas where there are no forces in between molecules except when they are in contact. You can think of an ideal gas as a collection of billiard balls bouncing around in 3 dimensions. To the billiard balls there is no difference in being a 1 meter away from the next closest ball, or being 1 mm away. Because there are no forces between the different balls. When they hit they bounce off each other instantly with no loss of energy and go in new directions.
In a real gas, there are additional forces in play due to electromagnetic interactions betweeen the molecules. Usually attractive forces are stronger at longer distances and repulsive forces are stronger at very short distances. So real gasses usually will be a little more compact (but not always) because they molecules are pulling each other together. If a gas has strong enough attractive forces, it turns into a liquid, where all the particles will condence so much that they are not allowed to go free of each other anymore.
The only difference between an ideal gas and a real gas is the types of forces we are allowed to use. There is no such thing as an ideal gas in real life, but it is a very good approximation for many gasses like N2, O2, and Nobel gases. It makes the math a lot easier to work with.
~Lyuokdea