A clicking noise in an ankle or any joint is usually the result of wear and tear on the cartilage. Eventually, excess portions of cartilage become bent with the joint.
A clicking sound in your ankle could be various things but the most likely is a loose bone chip. While not dangerous, the small chip can be annoying. Removing it is possible by a doctor but not necessary
if your ankle does a crack occasionally its probably just a stiff joint. it shouldnt be anything bad unless it has bad pain accompanied. if so, see your doctor.