As of 2014, it takes approximately 150 to 300 days for a spacecraft to travel from Earth to Mars. The time depends on the launch speed, how much fuel is used and the alignment of Earth and Mars.
The distance between Earth and Mars varies. The shortest distance between the planets occurred in 2003, when they were 34.8 million miles apart. When they are on opposite sides of the sun, they can be up to 250 million miles apart. The average distance separating the planets is 140 million miles. The fastest spacecraft to reach Mars as of 2014 is the Mariner 7, which flew by Mars in 1969.