Expanding on my comment, decompose $f$ into its positive and negative parts as $f(x)=f^+(x)+f^-(x)$ where $f^+(x)=\max(0,f(x))$ and $f^-(x)=\min(0,f(x))$.
First, notice that $|f(x)|=f^+(x)-f^-(x)$.
We have then $|\int^a_b f(x)dx|= |\int^a_b f^+(x)dx + \int^a_b f^-(x) dx|\leq |\int^a_b f^+(x)dx|+|\int^a_b f^-(x)dx|$
The inequality above is just the normal triangle inequality. Then, recognizing that the integral on the left is positive or zero and on the right is negative or zero, this continues as
$=\int^a_b f^+(x)dx -\int^a_b f^-(x)dx = \int^a_b f^+(x)-f^-(x)dx = \int^a_b|f(x)|dx$
For indefinite integrals, one has to consider the integration constant that occurs, the $+C$ of $\int f(x)dx = F(x)+C$. Technically, the indefinite integral of a function is a whole family of curves, some of which will be greater than or less than others within its family.