Frequency Domain Filtering
This is just "faking" the magnitude response of an IIR filter. The output's magnitude spectrum looks just like it has been filtered by the IIR filter with the given frequency response. Although it may somehow work, there are some limitations:


Frequency-domain filtering is usually much more computationally demanding.
It is not for real-time.


The problem with IIR filters is that they don't have linear phase and cause phase distortion. However, when the filtering is not in real-time (such as when dealing with a stored signal on a computer) there are some alternative non-causal approaches to make the IIR filter zero-phase. The most notable is forward-backward filtering which Matlab's filtfilt also uses. It actually is simple: to make the phase impact symmetric, pass the signal twice from the IIR filter, in opposite directions. After the signal passed the filter (the forward pass), time reverse it and then pass the result again through the filter. So the second (backward) pass cancels the phase impact of the forward pass. However, the magnitude response of the overall filer is the square of the frequency response of the IIR filter.