Ultrafast lasers enable non-contact, waste free, precise material removal. We have demonstrated single-digit nanometer precision polishing of optical material using a femtosecond laser. For ultrafast-laser-based waveguide writing, we study the underlying physics behind nonlinear optical dynamics during the femtosecond laser processing of crystalline materials. Unidirectional pulse propagation equation simulation is carried out to study the evolution of energy, fluence, plasma generation, and beam waist of a femtosecond pulse along the propagation direction under different energy and focusing conditions. Waveguides having a loss of 0.21 dB/cm are obtained. A Nd:YAG based waveguide laser with lasing threshold of 50 mw was demonstrated.