Racedotril belongs to a class of drugs known as antisecretory agents, which work by inhibiting the secretion of fluid into the intestines and reducing the frequency and severity of diarrhea.