The order $~$|G|$~$ of a group $~$G$~$ is the size of its underlying set. For example, if $~$G=(X,\bullet)$~$ and $~$X$~$ has nine elements, we say that $~$G$~$ has order $~$9$~$. If $~$X$~$ is infinite, we say $~$G$~$ is infinite; if $~$X$~$ is finite, we say $~$G$~$ is finite.
The order of an element $~$g \in G$~$ of a group is the smallest nonnegative integer $~$n$~$ such that $~$g^n = e$~$, or $~$\infty$~$ if there is no such integer. The relationship between this usage of order and the above usage of order is that the order of $~$g \in G$~$ in this sense is the order of the Subgroup $~$\langle g \rangle = \{ 1, g, g^2, \dots \}$~$ of $~$G$~$ [generating_set generated by] $~$g$~$ in the above sense.