Fundamentals and applications of slow light