Symmetry fractionalization describes the fascinating phenomena that excitations in a 2D topological system can transform under symmetry in a fractional way. For example in fractional quantum Hall systems, excitations can carry fractional charges while the electrons making up the system have charge one. An important question is to understand what symmetry fractionalization (SF) patterns are possible given different types of topological order and different symmetries. A lot of progress has been made recently in classifying the SF patterns, providing deep insight into the strongly correlated experimental signatures of systems like spin liquids and topological insulators. We review recent developments on this topic. First, it was shown that the SF patterns need to satisfy some simple consistency conditions. More interesting, it was realized that some seemingly consistent SF patterns are actually `anomalous, i.e. they cannot be realized in strictly 2D systems. We review various methods that have been developed to detect such anomalies. Applying such an understanding to 2D spin liquid allows one to enumerate all potentially realizable SF patterns and propose numerical and experimental probing methods to distinguish them. On the other hand, the anomalous SF patterns were shown to exist on the surface of 3D systems and reflect the nontrivial order in the 3D bulk. We review examples of this kind where the bulk states are topological insulators, topological superconductors, or have other symmetry protected topological orders.