Not much info here - your question is exactly the same as your title, unfortunately, so we don't know what you've already tried.
At this age, though, kids do respond to losing what they want - which is you. And at this age, as with all ages, they respond to absolute consistency. So every time he/she hits, put him down in a boring place (car seat, play pen, crib) and walk away. Say very little - "No hitting" is enough. Say it once, firmly, secure him/her for safety (such as car seat) and walk away - either into the next room, or if in the car, far enough that you can see him/her for safety but still deprive him/her of your company.
Same thing with the hair pulling - I do agree that you should put your hair out of reach as much as possible, and you can try to give him/her something else to hold, but mostly responding with putting your child down instantly and consistently will help get the message across. It will not work the first time, or the second - but kids who see that they don't get what they want when they do hurtful or unsafe or unpleasant things usually figure out that their own lives are better if they stop. It's not about them feeling empathy for the person they've hurt - they don't get that at 10 months, of course, but they don't get it at 2 or 4 or 6 either. So it has to be harder for them when they hit than it is when they don't.