Immersed boundary methods for biomedical flows: theory and applications