Essentially the muscles work by harnessing electrical gradients which (highly over simplified explanation coming) they create by harnessing ATP and moving specific ions from one side of a membrane to another.
Look up "muscle / innervation" "gated ion channels" "Na/K pump" "calcium pump" "muscle polarization/depolarization"