There are multiple levels to how your brain processes your actions.
There are parts of your brain that operate “intuitively”, i.e. without your conscious decision. And there’s your conscious part of the brain, that’s the one you’re using when you’re thinking.
Take walking and moving your legs for example. You can decide to, for example, rotate your leg at your knee for 10°. However, when you’re walking, you’re not thinking about moving individual joints. You’re just consciously deciding to take a step, and your “muscle memory”, i.e. your conscious brain already knows what kind of a complex movement in the leg it needs to do to make you walk.
Your brain remembers certain kinds of motions and performs them without your conscious effort. That’s essentially what muscle memory is.
Latest Answers