C.H.
I have two boys, 6, 4, and both went through this stage. I do believe it is a stage because at 2, our boys weren't able to communicate verbally and defaulted to communicating through physical means. They didn't have words to use.
We upped the sign-language. I also would show them what is acceptable by taking their hand and gently stroking my arm. I would say, "no hit, yes nice touching."
I figured he didn't know what to replace with the hitting that would get my attention. And when he would gently touch me, I would give him a jackpot of praise.
This seemed to work. Tell him what not to do and show him what he should do instead.
Welcome to the terrible twos.