A semi-major axis of an ellipse defines the half diameter of the ellipse where it is longest. That's a convenient measure to compare ellipses and express its properties. Mathematically you can describe an ellipse with semi major axis $a$ (how long is it) and semi minor axis $b$ (how thick is it) as $$ \frac{x^2}{a^2} + \frac{y^2}{b^2} = 1 $$
Often, the eccentricity is used which is defined as $$ e = \sqrt{1 - \frac{b^2}{a^2}} $$
So for a circle with $a = b$, the eccentricity is $0$, and for the edge case, a very long ellipse with $a \rightarrow \infty$, we get a parabola which hence has an eccentricity of 1.
Now, what would a trajectory look like with an eccentricity larger than 1? We get an eccentricity larger than one, if the radix of the definition of eccentricity gets larger than 1, thus $-b^2 / a^2$ needs to be positive. We achieve that if we introduce an imaginary semi major axis (not a negative! See the linked wiki article for a brief introduction to the concept of those numbers) $a$ such that $a^2 < 0$.
With that extension we can express hyperbolic orbits with the same formulation as elliptic and parabolic ones, with a single number, the eccentricity:
$$ a \rightarrow a_r + ia_i\\ b \rightarrow b_r + ib_i $$
and thus we get a single number to describe any kind of orbit, closed and not-closed ones:
$$ e = \sqrt{1 - \frac{b^2}{a^2}} = 0 \cdots <1: \qquad\mathrm{ellipse}\qquad a = a_r; a_i = 0\\
$$
$$ e = \sqrt{1 - \frac{b^2}{a^2}} = 1: \qquad\mathrm{parabola}\qquad a = \infty\\
$$
$$ e = \sqrt{1 - \frac{b^2}{a^2}} > 1: \qquad\mathrm{hyperbola}\qquad a = i\cdot a_i; a_r = 0\\
$$
Energetically, objects in elliptical orbits don't have enough energy to escape, objects on a parabolic orbit had no kinetic energy at infinity and thus just escape and it only needs a slight change in orbital energy to capture them. Objects on hyperbolic orbits were already in motion at infinity, thus have excess orbital energy and would need to loose much more energy to capture them (and in a solar system context are very likely to be of extra-solar origin).