It is necessary for the glans of the penis to enter the vagina for the punishment of hadd to be carried out. The intercourse less than it, for instance, kissing, hugging, rubbing the penis between the thighs, etc do not necessitate the punishment of hadd (punishment fixed by the Quran) although they are haram.