Consider the set of all numbers less than $n$ and relatively prime to it. Let $\{a_1,a_2,...,a_{\varphi(n)}\}$ be this set.
Consider a number $c < n$ and relatively prime to it i.e. $c \in \{a_1,a_2,\ldots,a_{\varphi(n)}\}$.
First observe that for any $a_i$, $c a_{i} \equiv a_{j} \pmod{n}$ for some $j$.
(True since $c$ and $a_i$ are themselves relatively prime to $n$, their product has to be relatively prime to $n$. This follows immediately from the definition).
If $c a_{i} \equiv c a_{j} \pmod{n}$ then $a_i = a_j$.
(True as cancellation can be done since $c$ is relatively prime to $n$).
Hence, if we now consider the set $\{ca_1,ca_2,...,ca_{\varphi(n)}\}$ this is just a permutation of the set $\{a_1,a_2,...,a_{\varphi(n)}\}$.
Thereby, we have $\displaystyle \prod_{k=1}^{\varphi(n)} ca_k \equiv \prod_{k=1}^{\varphi(n)} a_k \pmod{n}$.
Hence, we get $\displaystyle c^{\varphi(n)} \prod_{k=1}^{\varphi(n)} a_k \equiv \prod_{k=1}^{\varphi(n)} a_k \pmod{n}$.
Now, note that $\displaystyle \prod_{k=1}^{\varphi(n)} a_k$ is relatively prime to $n$ and hence you can cancel them on both sides to get
$$c^{\varphi(n)} \equiv 1 \pmod{n}$$ whenever $(c,n) = 1$.
Remember, if $G$ is a finite group of order $n$, then for all $g \in G$ we have $g^n = e$. Since the order of $U(n)$ is $\phi(n)$, then $a^{\phi(n)} = 1$ for all $a \in U(n)$.
Notice that $\mathbb{Z}/n\mathbb{Z}$ consists of equivalence classes and $U(n) = \{ \overline{a} \in \mathbb{Z}/n\mathbb{Z} \,:\, \gcd(a,n) = 1\}$. So the elements of $U(n)$ can be viewed as integers as long as you understand that we are really identifying the classes with representatives from each class (which are integers). For instance, in $U(12)$ we consider $5$ and $17$ to be the same element since they represent the same equivalence class in $\mathbb{Z}/12\mathbb{Z}$.
Also, if $n$ is not prime then $U(n)$ may not be cyclic (hence does not have a generator).
Best Answer
Note that $1, a, \ldots, a^{o(G)}$ are $o(G) + 1$ elements of $G$ and thus, cannot all be distinct. Thus, $$a^m = a^n$$ for some $0 \le n < m \le o(G)$ which gives you that $$a^{m-n} = 1.$$ Since $m - n \neq 0$, that gives you that $a$ has finite order.
In general, any element of a finite group has a finite order.