Could be a few things and for all, you need a service engineer to diagnose and replace. Please don't leave it clicking for hours.
Logic board.
relays.
pump start capacitor.
pump failed.
When the dishwasher starts to make funny noises or working loudly, it is usually because there are debris caught in the draining pump, although a problem with the motor is also possible.Drain Pump: The drain pump might needs to be checked for debris. If its clean and noisy it needs to be replaced.Circulation Pump: Bearings inside the circulation pump will wear out over time and can cause a loud groaning sound while the dishwasher operates.Wash Impeller: The wash impeller has small plastic blades that help with water flow to the control arms. If one of the blades breaks there could be a noise. It may also be improperly aligned. Inspect for any signs of damage.Source: https://www.electrafixbc.ca/appliances/dishwasher.html