I have read in many sources that particles and their respective antiparticles annihilate, but a particle and another particle's antiparticle (for example, an electron and an antiproton) do not. However, I could not find what, more exactly, happens when two such particles interact. I have also read that when a high energy beam of protons and antiprotons collide, only part of them annihilate because it is necessary for all the quarks and antiquarks to interact for total annihilation. Does this have to do with the fact that different particle-antiparticle pairs do not annihilate as well? Do only their corresponding quarks-antiquarks pairss annihilate?
The standard model Lagrangian encapsulates all allowed particle interactions in the weak, strong, and electromagnetic forces. The Lagrangian has individual terms which represent allowed interactions, and these terms can be pictorially drawn as vertices of Feynman diagrams.
For example, the only QED interaction vertex is two electrically charged fermions and a photon. Looking at these allowed vertices, and following the rules for constructing Feynman diagrams will allow you to determine whether a certain interaction is permitted between two particles. For example: an electron and a positron can annihilate to form two photons:
For interactions between electrons and protons/antiprotons, you must recall that protons are composite particles and the interactions fundamentally take place between electrons and the quarks inside the protons/antiprotons. The only possible modes of interaction are exchange of a virtual photon or a W/Z boson. You can then construct possible interaction Feynman diagrams yourself.
Annihilation is generally reserved for a scattering event where a particle and antiparticle scatter off each other and release high energy photons via the electromagnetic force.
If you collide two proton beams, the dynamics become dramatically more complicated than proton-electron scattering. However, the relevant interactions are still governed by these vertices, but you must think on the scale of individual quarks--which may annihilate or undergo various other permitted scattering interactions.