The research of rock deformation and breaking has important scientific significance and engineering significance. Deformation is a long process, while the breaking happens in a monent relatively. In this paper the rock uniaxial compression test was simulated by using PFC2D. The complete curve of stress-strain was devided into six stages: compaction stage, elastic deformation stage, plastic sclerosis stage, plastic softening stage, breaking stage and breaking residual stage. It was found that the deformation localization generated the formation and extension of the cracks. When there were enough cracks, the specimen began to damage. Only a few crack bands evolved to breaking bands. The specimen’s breaking was mainly caused by indirect tension, supplemented by shear.