Lets look at a musical note system with $n$ notes. We see two notes as the same when they differ one octave. We write the collection of notes as $X= \Bbb Z_n$
$T: X \rightarrow X$, $T(x)=x+1$ corresponds with transposing a note, and $I: X \rightarrow X$, $I(x)=-x$ corresponds with the inverse of a note.
Show that $T , I$ produces a dihedral group$G := D_n$
$$D_n = \langle a, b : a^n = b^2 = 1; bab = a^{-1} \rangle .$$
The notation varies between noting this $D_n$ or $D_{2n}$, but anyway the idea is that you have two generators, one of order 2 and the other of some other order, and the order of the whole group is twice that order.
You can see $\langle T, I \rangle$ as a subgroup of $\operatorname{Sym}_{\mathbb{Z}_n}$, the group of symmetries of $\mathbb{Z}_n$, for which the identity element is the identity permutation $id$.
You have $T^n = I^2 = id$. Also, for all $x \in \mathbb{Z}_n$, you have: $$ITI(x) = IT(-x) = I(-x + 1) = x - 1 = T^{-1}(x),$$ so that $ITI = T^{-1}$. This shows that $\langle T, I \rangle$ is a dihedral group of order $2n$, just look at the definition above and put $T$ in the place of $a$ and $I$ in the place of $b$.
EDIT: $T^n = I^2 = id$.
First notice that for all $x \in \mathbb{Z}_n$, we have: $$T^n(x) = T^{n-1}(x + 1) = T^{n - 2}(x + 2) = \cdots = T(x + (n-1)) = x,$$ because $x + n \equiv x \, (mod \, n)$. So $T^n(x) = x = id(x)$ and as $x$ was arbitrary, $T^n =id$.
Secondly, for all $x \in \mathbb{Z}_n$, we have: $$I^2(x) = I(-x) = -(-x) = x = id(x)$$ and so as before $I^2 = id$.