Code formatting involves following a consistent style and indentation to improve code readability and maintainability.