Union by Rank is an optimization technique used in the union-find data structure to minimize the height of the trees, thereby speeding up the find operation. It works by always attaching the smaller tree under the root of the larger tree, ensuring that the resulting tree remains as flat as possible.