If you think of a collision as something like a chemical reaction with inputs and outputs, then the rules are:
- The total charge must be conserved (same before and after)
- The total angular momentum must be conserved.
- The total energy must be conserved.
- The total momentum must be conserved.
- In most interactions, the quantities B (baryon number) and L (lepton number) are conserved. B is "baryon number", which for ordinary matter counts the number of protons and neutrons.
L is "lepton number", which for ordinary matter counts the number of electrons and neutrinos (there are other kinds of leptons, but they are not found in ordinary matter). Anti-particles have negative baryon numbers or lepton numbers.
The rules for combining angular momentum are a little complex: If you two particles with spin (intrinsic angular momentum) S_1 and S_2, then the total angular momentum (which includes both spin and orbital angular momentum) of the two of them can be any integer greater than |S_1 - S_2|. So an electron and its anti-particle (the positron), which have spin-1/2 can be combined to produce angular momentum 0, 1, 2, etc. Two photons, each of which have spin-1, can be combined to produce angular momentum 0, 1, 2, etc. So an electron and a positron can collide to produce two photons. (They can't collide to produce just one photon, because you can't get the energy and momentum to work out, although angular momentum works out.)