With the developement of the chirped pulse amplification techniques, high-power laser systems with terawatt or petawatt output have been constructed around the world. With these powerful lasers, physics of laser-plasma interactions in the relativistic regime has become the most advanced scientific subject. However, the plasma is a very complicated system, it's hard to derive a single analytical theory which can be applied to all phenomena in laser-plasma interactions. The best method to explore the physical mechanisms in such a complicated system is through computer simulations. Among all the plasma simulation methods, particle-in-cell simulation is the most powerful and straight forward simulation method. In this thesis, three dimensional PIC simulations of relativistic nonlinear optics have been done by VORPAL code. An introduction of phenom- ena in relativistic laser-plasma interaction are written in Chapter 1. The algorithms used in PIC simulation as well as the methods used in the post-analyses of simulation data are described in Chapter 2. Computer platforms, software tools and performance benchmarks are described in Chapter 3. Simulations of relativistic nonlinear optics in plasmas according to analytical results derived by Prof. Wang and Prof. Tsaur are shown in Chapter 4. The simulation of generating a strong mid-infrared pulse in a plasma bubble by photon acceleration and self-modulation is written in Chapter 5. The simulation results in Chapter 5 can be successfully compared with experiment results. Conclusions and future perspectives of this work is in Chapter 6.