When it comes to max strength it’s either hypertrophy, the creation of more muscle cells, or recruitment, making the connection between your brain and muscle cells better. The UA blog has an article about myelination that’s a great explanation. https://uphillathlete.com/myelination-make-you-better-athlete/
Local muscular endurance is a little more complicated, I don’t fully understand it and I’m not sure science has fully explained what coaches have found out works yet. It involves your muscle’s tolerance to the metabolites of high effort; the ability to reuse lactate (that’s where your aerobic capacity comes into play) and your muscles tolerance to hydrogen ions (which is trained by pushing through painful muscular pump), allowing you to sustain that high effort for a little longer. Hopefully a more knowledgeable person than me will be able to complete my answer.