What is the relation between semidirect products, extensions, and split extensions?

I tried to explain it to you by answering your concrete question (Nonabelian group of order $p^3$ and semidirect products) yesterday, but maybe it was too short. Let's give it another try:

A group $G$ is the semidirect product of two groups $H$ and $K$ ($G\cong H\rtimes_\alpha K$ for some $\alpha$) if and only if there is a short exact sequence of groups $$0\rightarrow H\rightarrow G\rightarrow K\rightarrow 0,$$ that splits.

How to do this?

Let's assume $G\cong H\rtimes_\alpha K$, then $H$ is normal in $G$ and we get and exact sequence $$0\rightarrow H\rightarrow G\rightarrow (G/H)\cong K\rightarrow 0$$ and this sequence splits via the inclusion $K\hookrightarrow G$.

So the other way around: Take an exact sequence $$0\rightarrow H\rightarrow G\rightarrow K\rightarrow 0,$$ that splits via $\beta\colon K\rightarrow G$. Define $\alpha\colon K\rightarrow Aut(H),k\mapsto C_{\beta(k)}|_H,$ where $C_g$ denotes the conjugation with $g\in G$ in the group $G$. This induces an automoprhism on $H$ if we restrict it to $H$, since $H$ is normal in $G$.

Of course I did a lot of identifications like $H\cong H\times\{0\}$ and I hope you can work this out.

So we have a correspondence between splitting short exact sequences and semidirekt products. Short exact sequences of the shape $$0\rightarrow H\rightarrow G\rightarrow K\rightarrow 0$$ are just extensions of $K$ with $H$ to $G$. So classification of semidirect products is equivalent to classify splitting short exact sequences or let's call it splitting extensions.