Gravitational Lensing by Black Holes: A Comprehensive Treatment and the Case of the Star S2