Formal socialization is the organized learning of skills, norms and information such as in a school environment.
Informal socialization is the learning without formal structure, outside of an institution, such as with friends.
I would say that usually the informal socializing is more instrumental in forming political beliefs, but exceptions are also possible.