The dispenser in your dishwasher contains the main wash detergent and the rinse aid. A hinged cap keeps the detergent compartment closed until the electronic control board signals the cap to open at the right time.
When the detergent dispenser is faulty, the detergent won’t be released and your dishes will still remain dirty.