In this paper we review the micromachining of photonic devices in several materials by means of ultrashort laser pulses. The physical mechanisms underlying the refractive index modification and the different laser systems used to induce such modification are discussed. A thorough review of the photonic devices demonstrated with the femtosecond laser microfabrication technique is presented. In particular, this paper is focused on photonic devices based on optical waveguides. The devices are organized into two categories: passive and active devices. In the former category power splitters, directional couplers, interferometers and Bragg gratings are reviewed, while in the latter amplifiers and lasers are discussed. Finally, conclusions and future perspectives of femtosecond laser micromachining in photonics are provided.