I tried to upload basic servo example code to arduino
Which one?
What I have to do to get my servo work?
Pay it more? Buy it flowers? Whisper sweet nothings in it's ear? Wire it correctly? Power it correctly? There seems to be dearth of information in your post.