It's well-known that for a natural number $n$ with prime factorization $n=\prod_i p_i^{r_i}$, all groups of order $n$ are abelian if and only if all $a_i\le 2$$r_i\le 2$ and $\gcd(n,\Phi(n))=1$ where $\Phi(n)=\prod_i (p_i^{r_i}-1)$. (See http://groups.google.co.uk/group/sci.math/msg/215efc43ebb659c5?hl=en)
For other $n$ there are non-abelian groups. If some $r_i\ge3$ then we can take a direct product of a non-abelian group of order $p_i^3$ and a cyclic group. There are always non-abelian groups of order $p^3$; when $p=2$ take the quaternion group, and when $p$ is odd the group of upper triangular matrices with unit diagonal over $\mathbb{F}_p$.
Otherwise $G$ will have a factor $pq$ with $p\mid(q-1)$ or $pq^2$ with $p\mid(q^2-1)$. In the first case the group of all maps $x\mapsto ax+b$ for $a$, $b$, $x\in\mathbb{F}_q$ and $a\ne 0$ has a non-abelian subgroup of order $pq$. In the second case replace $\mathbb{F}_q$ by $\mathbb{F}_{q^2}$ and then get a non-abelian group of order $pq^2$. In both cases multiply by a cyclic group to get an order $n$ non-abelian group.