Unit content
Simple pendulum and the small-angle period
A simple pendulum consists of a point mass $m$ suspended from a fixed pivot by an ideal massless string of length $L$. Let $\theta$ be the angle from the downward vertical.
When the pendulum is displaced, gravity produces a torque about the pivot that tends to restore it toward $\theta=0$.
The gravitational torque is
$$\tau=-mgL\sin\theta.$$
The minus sign indicates that the torque acts opposite to the displacement. The string tension produces no torque about the pivot because its line of action passes through the pivot.
For a point mass at distance $L$,
$$I=mL^2.$$
Using rotational dynamics,
$$I\ddot\theta=\tau,$$
so
$$mL^2\ddot\theta=-mgL\sin\theta.$$
After canceling $mL$,
$$\boxed{\ddot\theta+\frac{g}{L}\sin\theta=0}.$$
This is the exact ideal-pendulum equation. It is nonlinear because of the $\sin\theta$ term, so its motion is not exactly simple harmonic at arbitrary amplitude.
Small-angle pendulum
For sufficiently small $|\theta|$ measured in radians,
$$\sin\theta\approx\theta.$$
The equation becomes
$$\ddot\theta+\frac{g}{L}\theta\approx0.$$
This is the harmonic oscillator equation with
$$\omega\approx\sqrt{\frac{g}{L}}.$$
Therefore the small-angle period is
$$\boxed{T\approx2\pi\sqrt{\frac{L}{g}}}.$$
The mass has canceled: in this ideal model, pendulums of the same length have the same small-amplitude period regardless of the bob's mass.
Worked example
For a pendulum of length
$$L=1.00,\mathrm m,$$
near Earth's surface,
$$T\approx2\pi\sqrt{\frac{1.00}{9.81}}\approx2.01,\mathrm s.$$
A complete back-and-forth oscillation therefore takes about two seconds.
What the formula does and does not say
The familiar period formula is a small-amplitude approximation, not the exact period for every swing angle. At larger amplitudes the nonlinear $\sin\theta$ term matters and the actual period becomes longer than
$$2\pi\sqrt{L/g}.$$
The pendulum is important precisely because it separates two ideas: the underlying mechanics is nonlinear, while sufficiently small motion near the stable downward equilibrium is approximately harmonic.