Alot depends on how it were handled, or IF they were even handled before you got it. Alot of times if a you get your snake from a breeder, they don't have alot of time to handle each snake individually to get it used to being handled. That's one of the joys you get to ecperience as a new snake owner.
Patience is the key. Don't make sudden movements and if it does strike at you, just remain calm and don't jerk away. Once your snake realizes no harm will come to him by you picking him up, he should calm down considerably. Trust me, it'll be worth it in the end!