This document provides a comprehensive review of firefly algorithms. It begins with background on swarm intelligence and how firefly algorithms were inspired by the flashing lights of fireflies. It then describes the basic structure of firefly algorithms, including initializing a population of fireflies, evaluating their fitness, sorting by fitness, selecting the best solution, and moving fireflies toward more attractive solutions over generations. The document reviews applications of firefly algorithms in areas like continuous, combinatorial, and multi-objective optimization as well as engineering problems. It concludes by discussing exploration vs exploitation in firefly algorithms and directions for further development.