Show that $D_{12}$ is isomorphic to $D_6\times C_2$
You've gotten several good answers. Let me address the questions in your third paragraph.
I believe the result you are looking for is the following:
Definition. Let $G$ be a group, and let $N$ and $M$ be normal subgroups of $G$. We say that $G$ is the internal direct product of $N$ and $M$ if and only if:
- $N\cap M = \{e\}$; and
- $G=NM$.
And then we have:
Theorem. Let $G$, $H$, and $K$ be groups. The following are equivalent:
- $G$ is isomorphic to the external direct product of $H$ and $K$, $G\cong H\times K$.
- There exist normal subgroups $N$ and $M$ of $G$ such that $N\cong H$, $M\cong K$, and $G$ is the internal direct product of $N$ and $M$.
(There is no requirement that $G$ be abelian).
Proof. To show that (1) implies (2), let $\varphi\colon H\times K \to G$ be the isomorphism. Then let $N=\varphi(H\times\{e\})$, $M=\varphi(\{e\}\times K)$; since $\varphi$ is an isomorphism, and $H\times K = (H\times\{e\})(\{e\}\times K)$ and both subgroups are normal, condition (2) follows.
Conversely, let $\phi\colon N\to H$ and $\psi\colon M\to K$ be isomorphisms, and assume that $G$ is the internal direct product of $N$ and $M$. Define a map $f\colon G\to H\times K$ as follows: given any $g\in G$, then since $G=NM$ we have $g=nm$ for some $n\in N$ and $m\in M$; define $f(g) = (\phi(n),\psi(m))$.
First, note that this is well-defined: if $nm=n'm'$ for $n,n'\in N$ and $m,m'\in M$, then $(n')^{-1}n = m'm^{-1}$; but this element is in both $N$ and $M$, and since $N\cap M=\{e\}$, it follows that $m'm^{-1}=(n')^{-1}n = e$, hence $m=m'$ and $n=n'$. Thus, the expression $g=nm$ is unique, and since $\phi(n)\in H$ and $\psi(m)\in K$, we have that $f(g)$ is well defined and lies in $H\times K$.
Next, note that if $n,\in N$ and $m\in M$, then the fact that $N\cap M=\{e\}$ implies that $nm=mn$: because $$n^{-1}m^{-1}nm = \left( n^{-1}m^{-1}n\right)m = n^{-1}\left(m^{-1}nm\right),$$ the middle expression is in $M$, the third expression in $M$; so $n^{-1}m^{-1}nm\in N\cap M = \{e\}$, hence $n^{-1}m^{-1}nm = e$, so multiplying on the left by $mn$ we get $nm=mn$, as claimed.
Thus, to show $f$ is a group homomorphism, let $g,g'\in G$; write $g=nm$ and $g'=n'm'$. Then $gg' = (nm)(n'm') = n(mn')m' = n(n'm)m' = (nn')(mm')$. Hence, $$f(gg') = (\phi(nn'),\psi(mm')) = (\phi(n)\phi(n'),\psi(m)\psi(m')) = (\phi(n),\psi(m))(\phi(n'),\psi(m')) = f(g)f(g').$$
Next, to show $f$ is one-to-one, note that if $f(g)=(e,e)$, where $g=nm$, then $\phi(n)=e$ so $n=e$ (since $\phi$ is an isomorphism), and $\phi(m)=e$ so $m=e$. Thus, $g=nm=ee=e$. So $\mathrm{ker}(f)=\{e\}$, hence $f$ is one-to-one.
Finally, to show that $f$ is onto, let $h\in H$ and $k\in K$. Since $\phi$ and $\psi$ are isomorphisms, there exist $n\in N$ and $m\in M$ such that $\phi(n)=h$ and $\psi(m)=k$. Then $f(nm) = (\phi(n),\psi(m)) = (h,k)$. So $f$ is onto. Thus, $f$ is an isomorphism, and we are done. $\Box$
So, in order to show that $D_{12} \cong D_6\times C_2$, you could find normal subgroups $N$ and $M$ of $D_{12}$ such that $N\cong D_6$, $M\cong C_2$, $N\cap M=\{e\}$, and $D_{12}=NM$.
You don't tell us how you think about $D_{12}$; one can think of it as permutations on the set $\{1,2,3,4,5,6\}$ (number the vertices of the regular hexagon and describe the elements of $D_{12}$ by how the vertices are permuted), or abstractly as a group presented as: $$D_{12} = \Bigl\langle r,s\;\Bigm|\; r^6 = s^2 = 1,\quad sr = r^{-1}s\Bigr\rangle$$ (or maybe other ways of presenting $D_{12}$; thought I think that is the most common one).
Consider the subgroup $N = \langle r^2,s\rangle$. It is not hard to verify that this subgroup has $6$ elements, and so, being of index $2$, it must be normal in $D_{12}$. Then let $M=\{1,r^3\}$. Since $r^3r = rr^3$ and $r^3s = sr^3$, then $M$ is central, and hence normal (verify that $x^{-1}r^3x = r^3$ for every $x\in D_{12}$ using the observations above). And so $M$ is normal and isomorphic to $C_2$.
Then show that $N\cong D_6$ (which is not hard).
Finally, note that $N\cap M = \{e\}$ and therefore $|NM| = |N||M| = 12 = |G|$; since $N$ and $M$ are normal, $NM$ is a subgroup, and so $NM=G$. Thus, you will get, using the theorem, that $G$ is isomorphic to $D_6\times C_2$.
It's very hard to know exactly how you are supposed to attack such a problem without knowing your background. For example, if you've classified all groups of order 12, then this is a simple problem of showing they both match the same group in the list.
Here's an approach from a generator and relation viewpoint.
$D_{2n}$ is generated by a rotation of $360/n$ degrees (or $2\pi/n$ radians) and any reflection. Let's call such a rotation $x$ and reflection $y$. Then $x^n=1$ (I'll call the identity "$1$") and $y^2=1$ (because $(360/n)\times n = 360 = 0$ degrees and any reflection is its own inverse). Then because any rotation times any reflection is a reflection, we have $xy$ is a reflection and thus $xyxy=1$. This implies (keeping in mind $y=y^{-1}$ since $y^2=1$) that $xy=yx^{-1}$ and $yx=x^{-1}y$. Thus given any string of $x$'s and $y$'s we can push all of the $x$'s to the left and all of the $y$'s to the right. So an arbitrary element looks like $x^iy^j$. Keeping in mind that $x^n=1$ and $y^2=1$ so that $x$'s exponents "work mod $n$" and $y$'s "work mod $2$", we have $$D_{2n} = \langle x,y \;|\; x^n=y^2=xyxy=1 \rangle = \{ 1,x,\dots,x^{n-1},y,xy,x^2y,\dots,x^{n-1}y \}$$ (all $2n$ elements accounted for).
In particular, $D_{12} = \langle x,y \;|\; x^6=y^2=xyxy=1 \rangle =\{1,x,\dots,x^5,y,xy,\dots,x^5y\}$ and (using different letters to avoid confusion) $D_{6}= \langle a,b \;|\; a^3=b^2=abab=1 \rangle = \{1,a,a^2,b,ab,a^2b\}$. Also, let $C_2 = \langle u \;|\; u^2=1 \rangle = \{1,u \}$.
To establish an isomorphism you'll need to come up with a bijection that respects these relations. Let's try to invent a map $\varphi:D_{12} \to D_6 \times C_2$.
Notice that $x$ has order 6. So it needs to map to an element of order 6. Now $a$ has order 3 (the largest order of any element in $D_6$) and $u$ has order 2. So $(a,u) \in D_6 \times C_2$ has order $|(a,u)|=\mathrm{lcm}(3,2)=6$. Thus we can map $\varphi(x)=(a,u)$. It then seems logical to send $y$ (an element of order 2) to $b$ (an element of order 2) paired with the identity: $\varphi(y)=(b,1)$.
So if $\varphi$ is to be a homomorphism, we must have: $\varphi(x^iy^j)=\varphi(x)^i\varphi(y)^j=(a,u)^i(b,1)^j=(a^i,u^i)(b^j,1)=(a^ib^j,u^i)$.
Ok. Now we've invented our candidate map: $\varphi(x^iy^j)=(a^ib^j,u^i)$. Let's prove that it's an isomorphism.
Homomorphism: $\varphi(x^iy^j\cdot x^ky^\ell) = \varphi(x^ix^{-k}y^jy^\ell)=\varphi(x^{i-k}y^{j+\ell})=(a^{i-k}b^{j+\ell},u^{i-k})$. On the other hand, $\varphi(x^iy^j)\varphi(x^ky^\ell)=(x^iy^j,u^i)(x^ky^\ell,u^k)=(x^iy^jx^ky^\ell,u^iu^k)=(x^ix^{-k}y^jy^\ell,u^{i+k})$ $=(x^{i-k}y^{j+\ell},u^{i+k})$. Finally, notice that $(i+k)-(i-k)=i-i+k+k=2k$ so that $i+k=i-k$ mod $2$. Thus $u^{i-k}=u^{i+k}$. Therefore, $\varphi(x^iy^j\cdot x^ky^\ell) = \varphi(x^iy^j)\varphi(x^ky^\ell)$. So we've shown $\varphi$ is a homomorphism.
One-to-One and Onto can be seen many different ways (one way is just to map all 12 elements and see that you do indeed have a bijection). Another: Onto because $x$ maps to $(a,u)$ and $y$ maps to $(b,1)$ and these two elements: $(a,u)$ and $(b,1)$ generate the codomain. One-to-one: Suppose $\varphi(x^iy^j)=(1,1)$ then $(a^ib^j,u^i)=(1,1)$. Thus $u^i=1$ so that $i$ is even. $a^ib^j=1$ implies that $i$ is divisible by 3 and $j$ is even. But if $j$ is even, then $y^j=1$ and $i$ divisible by 3 and 2 means it's divisible by 6 so $x^i=1$. Thus $x^iy^j=1$. Thus $\varphi$ has a trivial kernel so it's one-to-one.
Well, there you go. It's definitely not the most efficient route, but hopefully this will give you some stuff to digest.
Have you thought about an isomorphism for these two? By the way, $D_6$ is only abelian when $n = 2$ (It gives you a group of order $4$ in which $rs = sr^{-1} = sr$.), so forget the $D_{12}$ abelian idea.
Try to exploit properties of isomorphisms. The center of the group is preserved by isomorphisms, and the center of $D_{12}$ is $\{ 1, r^3 \}$, hence you must map $r^3$ to the element that generates the center in the other group ; that is, $(1, x)$ (that is if I choose to write $C_2 = \langle x \ | \ x^2 = 1 \rangle$). Now the element $s$ in $D_{12}$ has the property that $ys = sy^{-1}$ for every element $y \in D_{12}$, and the element $(s,0)$ in $D_6 \times C_2$ also has this property, so map $s$ to $(s,0)$. What about $r$ in $D_{12}$? It is tempting to map it to a power of $r$ in $D_6$, but which one? Make things simple and try mapping it to $r$. Now we have a "guess" : \begin{align} r & \mapsto (r,1) \\ r^3 & \mapsto (1,x) \\ s & \mapsto (s,1) \\ \end{align}
and extend by multipliying those together
(ex : $r^5 s = r^3 r^2 s \mapsto (1,x)(r^2,1)(s,1) = (r^2s,x)$.)
Showing that this is an isomorphism is now calculations. I leave that up to you. Just so you feel that I am right, for instance $$ (r^4 s)(rs) = r^4 r^{-1} s^2 = r^3 \mapsto (1,x) = (rssr^{-1},x) = (rsrs,x) = (rs,x)(rs,1). $$ Another nice way to guess this is to use geometry ; looking at the symmetries of the hexagonal plate as $D_{12}$ and looking at $D_6 \times C_2$ as the symmetries of the triangular plate inscribed in the hexagonal plate, in which $C_2$ gives you the half-turn symmetry of the hexagonal plate.
Hope that helps,