The distance between Earth and Mars can vary considerably due to the different orbits they have around the Sun.
A popular example is to imagine Earth and Mars as two different cars driving around a race track. Earth is in the inside lane moving around the track quickly, whereas Mars is on the outside lane and they get closer to each other when making a pass.
The minimum distance from Earth to Mars is about 54.6 million kilometres and the furthest apart they can be is about 401 million kilometres, with the average distance being about 225 million kilometres. A small fraction of the distance between the Earth and the Moon.
If those numbers and those distances are a little to large to understand and put into perspective you should take a look at the following website, distancetomars.com, which shows the staggering distance between us and our nearest planetary neighbour in a very cool, easy to understand graphical way.