How lasers work (in theory)