In conversational English, either sentence would convey your meaning, but for the most accuracy you should say "A few hairs stuck out from beneath her turban."
A few hairs stuck "out of" her turban is unclear. In addition to your intended meaning, it could mean that the turban had hairs (hers, or from another source) protruding through the wraps of the turban, or even sitting on the surface and a few of them standing up. When you use "beneath", you are pinpointing the exact source of the hair.
If the hair simply "stuck" from beneath her turban, it sounds awkward because "stuck" can also mean glued. "Stuck out" means it protruded, which I believe is your intended meaning.