So I don't think this is really plausible using hard-science. However, you tagged this with [science-based] rather than [hard-science], and if the [science-based] tag is willing to engage in some heavy drinking and look the other way, we may be able to pull something together that looks at least somewhat science based.
I'd like to start with a prototype for the motor: Nitenol wire
Nitenol has what we call "shape memory." If high heat is applied to the wire, the phase transitions it undergoes cause it to "remember" that shape. Later, the wire can be bent into nearly any shape, and if a light heat is applied, the wire regains its shape. This has many uses in industry, particularly in the biomedical field where it lets surgeons implant something thin, and then let it acquire its shape once it is in place. If our hair had some of these shape memory properties, it could grasp things.
Of course, this is certainly far from a complete story. Nitenol's memory is a one way trip. It's actually just going from a highly energetic "stretched" form to its natural lower energy form dictated by memory of when it was last cooled from high heat. If we used nitenol for our hair, it could reach out and grab something, but it couldn't let go. If it did have a way to "let go," it would have to let go into a flaccid useless state with even less energy than its memory form. To do anything else would require the hair to be "alive" and metabolizing, and that would create a whole set of biological requirements that hair just isn't ready for (see the other answers for why).
To make this work, we're going to give [science-based] a few good shots of Absinthe, and while it's babbling on about the green fairy, we're going to make the assertion that "proteins are magical." We do some pretty spectacular things with proteins in biology, many of which are far and beyond my understanding. So let's assume we can make some pretty stellar protien structures with some remarkable properties. They can't break the laws of physics. In particular, conservation of energy is going to be a mighty challenge here, but we'll assume they're pretty darn nifty compounds.
The first challenge we'll have with prehensile hair is the need for control. If you suggest a head full of memory wire to any woman, and she'll let you know just how bad of an idea that is:
We're going to need to be very careful with our protien structures to make sure that we don't just create this biosphere's worst version of bed head ever. Instead, we're going to create what appears to be every woman's dream: hair that can transition from straight to curly to straight to curly. This would be very hard for a simple crystalline structure like nitenol, but isn't all that far from plausible for proteins.
To communicate with this hair, we're going to need a nervous system. However, we can't afford to have live nerves in the hair, so we're going to have to be a bit more frugal. Since [science-based] is still suffering from a pretty bad hangover at this point, let's permit the hair to be managed with an all digital signaling system. This sidesteps all sorts of complexities which arise with the real signaling systems of the human body. We can get away with this because, unlike an arm or a leg, hair is replaceable. It's constantly growing outwards, so its signaling system doesn't have to keep functioning for 70 or 80 years. Depending on how fast this hair grows, it might only have to function for 5.
We're going to want more than 2 states for each hair: curly and not. Really what we're going to want for prehensile hair is to have many addressable regions of hair, each of which can be made curly or not. Fortunately, by going digital, we can use prior art for this. There's a very well known protocol known as JTAG, which is fundamentally based on the idea of a shift register. You can connect a bunch of these devices into a line, and then begin "shifting" bits in. Every time you push a bit into the front, every device shifts one bit down the chain in order to make room for it, like a bucket brigade. We can build something like this with proteins using something like Jacob's ladder.
Each time you want to shift data down, you put a new protien it, and rotate the entire chain to move data along. This requires energy, but that energy can be supplied in the root, where the data originates. The root could provide all of the energy for this, because it's only signalling energy. It's not doing any real work like holding up a cup of coffee or swinging from a limb.
Perhaps each section of hair gets 8 states (3 bit shift register). They correspond to commands for what you want the hair to do. Now we can shift data to each section of hair, slowly but surely. I don't think we're going to have prehensile hair headbanging to metal with this approach, but we might be able to grab a branch like a sloth!
With JTAG, we signal that we're ready for "action" with an extra signal, TMS. This signal is sent to every part of the chain to announce to the chain "these bits are your actual command, rather than just being data to pass down the bucket brigade. Do something with it." This could be tricky and very non-organic, so I'm going to spice it up a bit. While I'm not ready to provide full-blown neurons in the hair, I do think we can do a tiny bit of processing using the energy we can transmit from the hair follicles. I'd like to give every segment of the hair a linear feedback shift register (LFSR). This is a really really simple digital device which really just mixes up the bits a bit. This doesn't really add all that much extra duty to my extravagantly overly complicated "science-based" solution, but what it does mean is that each section of hair sees a message that's slightly different than the previous section did. I'll then have the "go" message come from the tips rather than the follicle. This does a few things that are very useful:
- It gives a signal to let the hair strand know that every single part of the strand has received the correct signal -- we've filled up all of the chain with the right bits.
- It gives us a way to address the individual parts of the strand. Technically we could have just created a unique ID to each part, but that has a biological challenge associated with it. We have to remember that anything like hair is going to be attacked at a biological level if it has energy in it. That's why hair and nails are so resilient -- almost nothing can consume the energy in them. If I made it easy for some parasite to latch on and capture the mechanical energy from the hair, then some parasite would evolve. The randomness of using a LFSR makes it much harder for a parasite to grab any amount of energy out of the mechanical system.
- It provides feedback, similar to the TDO line of JTAG. If the hair is not properly functioning, the creature might command part of the hair to do something, just to see where the damage is.
- Predicting the behavior of these LFSRs is easy if you're the brain strapped to them, and have literally hundreds of opportunities to figure them out. In hair combat, it will be hard for the opponent to learn the exact structures of your LFSRs to manipulate your hair against you.
I just checked on [science-based], and it's still trying exotic solutions for the hangover I gave it, like those from this list, so I think I still have a little time left. We need to talk about energy. Nothing I've done so far has a remotely high enough power, in terms of watts, to manage prehensile hair. I've had to do this intentionally. If there's a source of power, I have to protect it biologically from parasites and such. The less universally accessible power I put in this system, the better. However, at some point, I need enough energy built up into the system to actually do something useful.
For this, I introduce "maintenance mode." One of the selectable modes for each hair segment is a low energy maintenance mode. This is most likely a very curly shape. This is the lowest energy mode which any hair segment can reach, so no matter what we do with the hair, eventually every segment reaches this curly form. The entire purpose of this form is to capture mechanical energy. The owner of the hair can manually stretch the hair, like stretching nitenol wire, adding energy into the system. If they stretch it far enough, it can eventually return to the initial high energy "straight" mode which is ready to do anything. This stores the energy in mechanical stresses rather than high energy molecules like glucose, so it should be harder for parasites to learn to take advantage of that energy source.
Also interesting would be that this charging technique could be done to individual segments. It doesn't even need to be the whole strand that is charged at once. I could see this being used two ways. One is that a person could move their prehensile hair around towards their arms, so that they can use the chemical energy in their arm muscles to store energy into their hair. This might be seen as a sort of "grooming" action, like a duck pruning their feathers.
The other interesting thing is that hair segments could "charge" each other. You could use one segment of prehensile hair to pull at another segment to recharge it. Of course this would be a lossy process. You'd expend far more energy from the donor segment than you'd gain in the recipient segment, but if it happened to be that you needed that particular section of your hair energized more, you might see it. One sign of nervousness might be the individual's hair writhing against itself trying find the best distribution of energy.
I think [science-based] may be looking my way, so it's time to make my exit. Hopefully that helped!