On an Earth-to-Mars transfer, a hyperbolic trajectory is required to escape from Earth's gravity well, then an elliptic or hyperbolic trajectory in the Sun's sphere of influence is required to transfer from Earth's sphere of influence to that of Mars, etc.
For traveling from Earth to Mars, a hyperbolic trajectory is necessary to escape Earth’s gravity. Then, an elliptical or hyperbolic path within the Sun’s sphere of influence is required to move from Earth’s sphere of influence into Mars’ sphere of influence, and this process continues.