You can't fly to Mars whenever you feel like it. The planets are moving targets, so a spacecraft has to be fired toward where Mars will be months from now β not where it is today. That only works when Earth and Mars sit at exactly the right relative angle, and that alignment comes around just once every ~26 months. Scroll through to lead the target, miss it, and see why the windows are so rare.
Earth (inner, blue) and Mars (outer, red) orbit the Sun at different speeds β Earth laps Mars. A cheap Hohmann transfer is half an ellipse: the craft coasts from Earth's orbit out to Mars's orbit, arriving half an orbit later. Fire at the wrong moment and it arrives at empty space β Mars has already moved on or hasn't arrived yet. Press Launch now any time to try, or let the helper line up the window for a guaranteed hit.
A window opens only when Earth leads Mars by the right phase angle (~44Β° for EarthβMars). After a launch, Earth races ahead and the geometry breaks β you have to wait for the planets to realign. They only return to the same relative position once per synodic period: for Earth and Mars that's about 780 days (~26 months). So real Mars missions all cluster in the same few months β 2018, 2020, 2022, 2024, 2026 β then nothing for two years. The green bands below are open windows; the gauge shows the current phase angle counting down to the next one.
Porkchop plots are how mission planners pick the exact day: a contour map of launch date vs. arrival date, with the lowest-fuel (lowest Ξv) departures forming a closed "porkchop"-shaped island in the middle of each window. Launch a few days off the optimum and the required Ξv β and the rocket you need β climbs steeply; launch a month off and the mission may be impossible.