Your brain is split right down the middle into two halves, called hemispheres. They look nearly identical, but they’re wired up to your body in a strangely crossed way. The left hemisphere mostly controls the right side of your body, and the right hemisphere controls the left. Why is anyone’s guess - it’s been like that since the earliest vertebrates.
The two halves stay in constant communication through a thick band of nerve fibers called the corpus callosum, which lets them coordinate everything. They specialize a bit too: the left side tends to be more involved in language and detailed analysis, while the right side handles more spatial and emotional processing. (The popular idea that some people are “left-brained” or “right-brained” is mostly an oversimplification.)
In rare medical procedures for severe epilepsy, doctors sometimes cut the corpus callosum to stop seizures from spreading. Patients with “split brains” function surprisingly well - but each hand can occasionally do something the other doesn’t want, and the two halves can give different answers to the same question.