The catenary is the shape of a self-supporting cable with mass. Typically in mechanics ropes are massless and their shape when in not carrying tension is undefined, and when carrying tension are just straight lines.
But for a rope/chain/cable that has a defined mass per length, the shape must curve because the tension on the ends of each segment must balance out the weight of the segment in-between.

Take any segment, and the weight $W$ must be counter-balanced by the vertical support loads $V_1$ and $V_2$. In addition, the combined tension on the left $\sqrt{H^2+V_1^2}$ must be tangent to the shape, and similarly for the combined tension on the right.
See this answer for the development of the equations.
Those are the necessary conditions to define the shape of the catenary.