When you know all three sides, rearrange the formula to solve for the cosine of the angle, then take the inverse cosine:
cos(C) = (a² + b² - c²) / (2ab), so C = arccos((a² + b² - c²) / (2ab)).
This step relies on the same cosine ratio you use in right-triangle trigonometry.