Introduction to high-energy astrophysics