First of all, I am very new to group theory.
The order of an element $g$ of a group $G$ is the smallest positive integer $n: g^n=e$, the identity element. I understand how to find the order of an element in a group when the group has something to with modulo, for example, in the group $$U(15)=\text{the set of all positive integers less than } n \text{ and relatively prime to } n.$$
$$\text{ which is a group under multiplication by modulo }n=\{1,2,4,7,8,11,13,14\},$$ then $|2|=4$, because
\begin{align*} &2^1=2\\ &2^2=4\\ &2^3=8\\ &2^4=16\mod15=1\\ &\text{So } |2|=4. \end{align*}
However, I don't understand how this works for groups that don't have any relation to modulo. Take $(\mathbb{Z},+)$ for instance. If I wanted to find the order of $3$, then I need to find $n:3^n$ is equal to the identity, which in this case is $0$.
I suppose my question can be summarized as follows:
Does the order of an element only make sense if we are dealing with groups dealing with modulo?