If $q$ is prime, then you know that there exists a group $P$ of order $q$, isomorphic to $\mathbb{Z}_q$. It's well known that $\text{Aut}(P) \cong \mathbb{Z}_q^{\times}$, where denotes the cyclic multiplicative group with the same elements as $\mathbb{Z}_q \setminus \lbrace 0 \rbrace$. Since $|\text{Aut}(P)|=q-1$ and $p|q-1$, there exists a subgroup $Q \leq \text{Aut}(P)$ of order $p$, by Cauchy's theorem. Define the $G \subset \text{Sym}(P)$ as follows:
$$G=\lbrace \varphi_{a,\sigma} \in \text{Sym}(P) :a \in P, \sigma \in Q \rbrace$$
where $\varphi_{a,\sigma}(x)=\sigma(xa)$, for all $x \in P$. It's an easy exercise to check $G$ is a non-abelian subgroup of $\text{Sym}(P)$ and that $G$ has order $pq$.
EDIT:
If there exists an other non-abelian group $G$ of order $pq$, then you can check that $G$ has a normal subgroup of order $q$ (by using Sylow's theorems) and since G also has a subgroup of order $p$ (again Cauchy), you can write $G$ as a semidirect product of these two subroups. But since the subgroup $Q$ of order $p$ was unique (up to isomorphism), the only possibility for $G$ is the one we constructed above.