[proofplan]
Write $\sigma$ as a product of its pairwise disjoint cycles $c_1,\dots,c_r$. Because [disjoint cycles commute](/theorems/774), the $k$-th power of $\sigma$ is the product of the $k$-th powers of the individual cycles. A single cycle of length $m_i$ has $k$-th power equal to the identity exactly when $m_i$ divides $k$. Therefore $\sigma^k$ is the identity exactly for the positive integers $k$ divisible by every $m_i$, and the least such positive integer is $\operatorname{lcm}(m_1,\dots,m_r)$.
[/proofplan]
[step:Write the permutation as commuting disjoint cycles]
Let $e \in S_n$ denote the identity permutation. For each $i \in \{1,\dots,r\}$, write the cycle $c_i$ as
\begin{align*}
c_i=(a_{i,1}\ a_{i,2}\ \cdots\ a_{i,m_i}),
\end{align*}
where $a_{i,1},\dots,a_{i,m_i} \in \{1,\dots,n\}$ are distinct. Define the support of $c_i$ by
\begin{align*}
A_i:=\{a_{i,1},\dots,a_{i,m_i}\}.
\end{align*}
The cycles are pairwise disjoint, so $A_i \cap A_j=\varnothing$ whenever $i \neq j$.
If $i \neq j$, then $c_i$ fixes every element of $A_j$ and $c_j$ fixes every element of $A_i$, while both cycles fix every element outside $A_i \cup A_j$. Hence $c_i c_j$ and $c_j c_i$ agree on every element of $\{1,\dots,n\}$, so
\begin{align*}
c_i c_j=c_j c_i.
\end{align*}
Thus the cycles $c_1,\dots,c_r$ commute pairwise. It follows by induction on $k \in \mathbb{N}$ that
\begin{align*}
\sigma^k=(c_1c_2\cdots c_r)^k=c_1^k c_2^k \cdots c_r^k.
\end{align*}
[/step]
[step:Characterize when a power of one cycle is the identity]
Fix $i \in \{1,\dots,r\}$. For each integer $q$, interpret the subscript $a_{i,q}$ cyclically modulo $m_i$, so that $a_{i,q}=a_{i,s}$ exactly when $q \equiv s \pmod{m_i}$. By the definition of the cycle $c_i$, for every $j \in \{1,\dots,m_i\}$ and every $k \in \mathbb{N}$,
\begin{align*}
c_i^k(a_{i,j})=a_{i,j+k}.
\end{align*}
Therefore $c_i^k$ fixes every element of $A_i$ if and only if $j+k \equiv j \pmod{m_i}$ for every $j \in \{1,\dots,m_i\}$, which is equivalent to
\begin{align*}
m_i \mid k.
\end{align*}
Since $c_i$ fixes every element outside $A_i$, this proves
\begin{align*}
c_i^k=e \iff m_i \mid k.
\end{align*}
[guided]
We isolate the basic fact about a single cycle. Fix $i \in \{1,\dots,r\}$, and write
\begin{align*}
c_i=(a_{i,1}\ a_{i,2}\ \cdots\ a_{i,m_i}).
\end{align*}
The elements $a_{i,1},\dots,a_{i,m_i}$ form the support
\begin{align*}
A_i:=\{a_{i,1},\dots,a_{i,m_i}\}.
\end{align*}
On this support, the cycle advances one position:
\begin{align*}
c_i(a_{i,j})=a_{i,j+1}.
\end{align*}
Here the subscript is read cyclically modulo $m_i$, meaning $a_{i,m_i+1}=a_{i,1}$ and, more generally, $a_{i,q}=a_{i,s}$ exactly when $q \equiv s \pmod{m_i}$.
Applying the same cycle $k$ times advances $k$ positions, so for every $j \in \{1,\dots,m_i\}$,
\begin{align*}
c_i^k(a_{i,j})=a_{i,j+k}.
\end{align*}
Thus $c_i^k$ fixes $a_{i,j}$ exactly when $a_{i,j+k}=a_{i,j}$, which by the cyclic indexing condition is equivalent to
\begin{align*}
j+k \equiv j \pmod{m_i}.
\end{align*}
Subtracting $j$ from both sides gives
\begin{align*}
k \equiv 0 \pmod{m_i}.
\end{align*}
This congruence is exactly the divisibility condition $m_i \mid k$.
The cycle $c_i$ already fixes every element outside $A_i$, and so every power $c_i^k$ also fixes every element outside $A_i$. Therefore $c_i^k$ is the identity permutation on all of $\{1,\dots,n\}$ if and only if it fixes the elements of $A_i$, and this happens if and only if
\begin{align*}
m_i \mid k.
\end{align*}
Hence
\begin{align*}
c_i^k=e \iff m_i \mid k.
\end{align*}
[/guided]
[/step]
[step:Convert the identity condition for $\sigma^k$ into divisibility conditions]
Let $k \in \mathbb{N}$. From the commuting product formula,
\begin{align*}
\sigma^k=c_1^k c_2^k \cdots c_r^k.
\end{align*}
Because the supports $A_1,\dots,A_r$ are pairwise disjoint, the factor $c_i^k$ is the only factor that can move elements of $A_i$. Therefore $\sigma^k=e$ if and only if $c_i^k=e$ for every $i \in \{1,\dots,r\}$.
Using the single-cycle criterion from the previous step, this is equivalent to
\begin{align*}
m_i \mid k \quad \text{for every } i \in \{1,\dots,r\}.
\end{align*}
Thus, for every $k \in \mathbb{N}$,
\begin{align*}
\sigma^k=e \iff m_i \mid k \text{ for every } i \in \{1,\dots,r\}.
\end{align*}
[/step]
[step:Take the least positive exponent that gives the identity]
By definition, $\operatorname{ord}(\sigma)$ is the least positive integer $k$ such that $\sigma^k=e$. The previous step shows that this set of positive integers is exactly the set of common positive multiples of $m_1,\dots,m_r$. By definition of least common multiple, the least such positive integer is
\begin{align*}
\operatorname{lcm}(m_1,\dots,m_r).
\end{align*}
Therefore
\begin{align*}
\operatorname{ord}(\sigma)=\operatorname{lcm}(m_1,\dots,m_r).
\end{align*}
This proves the theorem.
[/step]