Oh this is a fun age, isn't it?? I have a 14 month old who is doing the same thing. He things its fun to hit me and his big brother!
We do the same thing as Toni. When he does hit, we say "oh no! you have to be niiiiiice" while taking his hand to show nice touching. But yes, it might take a gazillion times, but slowly but surely we will get there.
Its also developmentally on track for them to be doing this at this age. Make sure your reaction doesn't make it any more "fun." My older son, also does this with his baby brother (mostly because he is often the victim!), but I think its good for all members of the family to show how to be nice. We also do it when he is not hitting, just as a friendly reminder.
This too shall pass. Best of luck while you are dealing with it.
B.