When the user clicks the "Calculate" button, the calculateExponent() JavaScript function is called. It retrieves the values of the base and exponent from the input fields, calculates the exponentiation using Math.pow(), and displays the result in the result element.