Union by rank · path compression · path halving — orange = root, number below = rank
find follows parent pointers to the root. Compression re-points every visited node straight at the root; halving points each visited node at its grandparent (one pass). Union by rank hangs the shorter tree under the taller one. The "worst-ish chain" preset disables rank and links roots into a tall path so a find on the deepest node is expensive.
With both tricks, any sequence of m operations on n elements costs O(m·α(n)), where α is the inverse Ackermann function — α(n) ≤ 4 for any n you'll ever see.