I came across two definitions of orbit:
Definition1: Let $p$ be a permutation of a set $A$ . Let $\sim\subseteq A\times A$ be the relation defined by $$\forall a,b\in A\,\left(a\sim b\iff\exists n\in\mathbb{Z}:\,p^{n}(a)=b\right)$$ This is an equivalence relation (easy to check).
The equivalence classes of this equivalence relation are called the orbits of $p$ in $A$.Definition2: Let $G$ be a group acting on a set $X$ through an homomorphism $\pi:G\rightarrow S_{X}$. Let $\sim\subseteq X\times X$ be the relation defined by $$\forall a,b\in X\,\left(a\sim b\iff\exists g\in G:\,\pi(g)(a)=b\right)$$ This is an equivalence relation (easy to check).
The equivalence classes of this equivalence relation are called orbits.
I'm not seeing how these can be equivalent, or at least how one can be a particular case of the other. In the second case, the orbits are defined relative to a group, while in the first they are defined relative to an element of a group (the symmetric group)... So: is there a connection? How? Or are these two separate concepts that share the name?