sounds like you have put something in it that should have been rinsed first like mashed potatoe in a pan cos that sticks to everything. you should do a cycle with just a tablet and no dishes.
you can also buy dishwasher cleaner tablets that you put in to wash the inside of it on a cycle.
if neither of the above resolves the issue, it is possible that your water softener has cracked and the regeneration salt is being recirculated (dirty salt looks like sand). this is a major repair and it may be cheaper to purchase a new appliance - but only if you have ruled out the other less damaging options. only an examination would be conclusive at this stage