Muons and taus are leptons. The muon's (radioactive) lifetime is about 2.2 microseconds, and the tau about 0.29 picoseconds. Pion and kaons are mesons. The pion and charged kaon lifetime is ~ 25 and 12 nanoseconds. All are created by very energetic collisions with protons. They do not reside in the protons. Eventually they all decay to electrons (or positrons) and anti-neutrinos (and neutrinos).
Bob S