Dimensions
The dimensions of a unit describe what kind of measurement it is. For example inches, miles and meters are all different units but they all mesure length. Simillarly, the kilogram, the gram and the pound (lb) are all different units of mass but they all share the dimension of mass. Conventially, the dimension of a unit is written between square brackets. The fundamental dimensional quantities are $[M]$, $[L]$, $[T]$ and $[A]$ to represent mass, length, time and charge respectively. All other quantities can be derrived in terms of these dimensions. Dimensions are useful to derive formula and as a check on whether formula has the correct form.
Use of Dimensions to Derive Equations
If we have some idea or can make an educated guess as to how one physical quantity relates to another we can use dimensions to derive the form of the equation. As an example, consider the equation for the period of pendulum bob. We might suppose that the period depends on the mass of the bob, the length of the pendulum and the acceleration due to gravity
We can express this as $T=m^x l^y g^z$. Where $x$, $y$ and $z$ are as yet undetermined indices.
To find the values of $x$, $y$ and $z$ we convert the formula into its dimensions. On the left-hand side the dimension of the period is [T], the dimension of mass is $[M]^x$, the dimension of the length of the pendulum is $[L]^y$ and the dimension of $g$ is $[LT^{-2}]$.
$[T]=[M]^x [L]^y [LT^{-2}]^z$
Equating left-hand indices with matching dimensions on the right-hand side.
$[M]: 0=x$
$[L]: 0=y+z$
$[T]: 1=-2z$
From this we can deduce that z=-1/2, while y=1/2 and x=1/2
Substituting these values into the original equation we obtain. $T=m^0 l^{\frac{1}{2}} g^{-\frac{1}{2}}= k(l/g)^{\frac{1}{2}}$. Where $k$ is a constant of proportionality. Compare this with the equation for the period of a pendulum $T=2\pi(\frac{l}{g})^{\frac{1}{2}}$. The form of the equation is correct, but it cannot determine the constant of proportionality.