Hi, UM. While I used to be into this very heavily, I haven't really followed the subject in over 20 years. Obviously, my knowledge will be outdated by technology to some extent. Still, most of the basics are probably pretty much the same.
To start with, muscles are extremely well adapted for what they do. Replicating the smooth, proportional motion of flexing a finger (and each joint individually, at that) with a motor, hydraulics, pneumatics, or shape-memory metal is hard enough to start with. To do it with anything like the force that muscles exert, and keep it all in a package that is no larger than a real arm, is just about impossible. And other than using an isotope power source, I can't think of any current battery technology that would keep the thing running for any appreciable length of time. I seem to recall seeing something somewhere about an artificial muscle (might have been in the Engineering section right here in PF) that could potentially solve that.
There are two main 'brain control' systems. The one that is commonly used is called 'myoelectric'. It uses skin contact electrodes to detect the electrical activity of a muscle in the intact part of a limb. The signal is then amplified and used as the control for the powered artificial part. This means, of course, that the wearer has to learn a new set of muscle commands to achieve the desired result. The other system is 'neuroelectric', wherein an electrical contact is actually introduced into a nerve fibre. That has apparently come along a lot since my day. Some (at least experimental) set-ups even have the electrodes implanted in the motor cortex of the brain. Once the signal is picked up, the rest is the same as in a myoelectric system. One of the advantages is that the wearer has only to do the same thing that he/she would if the original limb was intact.
One of the major hurdles to 'realistic' or 'natural' action of a prosthesis is feel. On-board electronics compare the action of the limb with the intent of the wearer. The force and velocity of a hand closing, for instance, is regulated by the muscle or nerve impulse so you can pick up something heavy, but still handle an egg without breaking it. Unfortunately, those feedback signals, as far as I know, can't be realistically relayed to the wearer. If you've ever tried to write, or even pick up a glass, when your hand is 'asleep' or very cold, you know that it isn't all that easy.
There are probably others here who know a lot more about it than I do, so I hope a few come on board. Meanwhile, you might try looking on line for more information. I'd start with the Utah State University (I'm not sure that's the exact name; maybe University of Utah?). They were always the leading edge researchers in prosthetics.