An apparatus (1) for treating constipation and removing fecalomas (F), comprising at least one element (2) designed to be ingested by a patient (P) (2), which is in the form of a tablet (4) or capsule (5) and has ferromagnetic properties, a magnetic device (3) adapted to interact with said ingestible element (2) through the body (B) of the patient (P) and to be placed outside the patient (P) in correspondence of his/her/its colon (C), movement means (12) associated with the magnetic device (3) to promote controlled movement of the ingestible element (2) in the colon (C). The ingestible element (2) comprises an outer layer (10) that encloses a core (6) of a base material comprising at least one ferromagnetic compound (7) in powder form dispersed in a chemically inert (8) matrix. The outer layer (10) is biocompatible to avoid direct exposure of the core (6) to the body (B) of the patient (P), and is insoluble, non-absorbable and capable of withstanding the gastrointestinal environment, such that it may reach the colon (C) of the patient (P) in intact form, contact the fecaloma (F), break down and push the fecalomas (F) and cause the intestinal contents to move forward in the aboral direction and be expelled with the faces in an unaltered state.