וַיֹּ֧אמֶר ל֣וֹ יְהוָ֗ה לָכֵן֙ כָּל־הֹרֵ֣ג קַ֔יִן שִׁבְעָתַ֖יִם יֻקָּ֑ם וַיָּ֨שֶׂם יְהוָ֤ה לְקַ֙יִן֙ א֔וֹת לְבִלְתִּ֥י הַכּוֹת־אֹת֖וֹ כָּל־מֹצְאֽוֹ׃
永恆者對他說:«因此,凡殺該隱的——!到第七代才必追討報應。»永恆者給該隱立了一個記號,使凡遇見他的人都不擊殺他。
Rashi
לכן כל הרג קין VERILY, WHOSOEVER SLAYETH CAIN — This is one of the verses where the construction is elliptical (literally, which abbreviate their statements), which give only a suggestion and do not fully explain. “Verily, whosoever slayeth Cain” express a threat, suggesting the consequence — “thus shall be done to him”, “thus and thus shall be his punishment”, without explicitly explaining what the punishment would be.
Ramban
Now because Scripture says, And the Eternal appointed a sign for Cain,444Verse 15. and it does not say, “and G-d gave him a sign,” or “made him a sign,” it indicates that He appointed for him a steady sign which would always be with him. Perhaps it indicates that as he wandered from place to place he had a sign from G-d indicating the way in which he should walk, and by that he knew that no misfortune would overtake him on that road.
In Bereshith Rabbah44522:27. the Rabbis similarly stated, “Rabbi Aba said: ‘He gave him a dog.’” Since he feared the beasts, He gave him one of them to walk before him, and wherever the dog turned to go, Cain knew that G-d commanded him to go there and that he would not be killed by any living creature. Now the Sages singled out a contemptible sign [a dog] as was befitting him, but the intent is that there was with him a perpetual sign showing him the way to go for such is indicated in the word vayasem (and He appointed).
In Bereshith Rabbah44522:27. the Rabbis similarly stated, “Rabbi Aba said: ‘He gave him a dog.’” Since he feared the beasts, He gave him one of them to walk before him, and wherever the dog turned to go, Cain knew that G-d commanded him to go there and that he would not be killed by any living creature. Now the Sages singled out a contemptible sign [a dog] as was befitting him, but the intent is that there was with him a perpetual sign showing him the way to go for such is indicated in the word vayasem (and He appointed).
Radak
ויאמר לו ה' לכן כל הורג קין שבעתים יוקם, I have decreed that anyone killing Kayin will be punished twice sevenfold for that deed, irrespective of whether the killer is man or beast. The number “seven” mentioned here is not to be understood literally, but is a figure of speech for multiples of one. The number is used in a similar sense in Leviticus 26,21 where it also does not mean that G’d will punish the Jewish people sevenfold for each of their sins, but He warns them that their punishment will be very severe. In Proverbs 24,16 שבע יפול הצדיק וקם, the meaning is also not that the righteous will fall down seven times and rise again, but that even if a righteous person falls on bad times repeatedly, being righteous, he will recover. These many ways in which a killer of Kayin would be avenged could be that his killer will be afflicted with numerous sicknesses, diseases, not with just one. They would afflict him successively, until he will succumb to the last such disease.
According to Torah Shleymah on our chapter item #114 G’d told Kayin that in consideration of the fact that he now displayed fear of and reverence for G’d, he would have his lifespan extended for seven generations. Onkelos explains the expression שבעתים as receiving punishment spread over seven generations. Just as Kayin’s eventual death was suspended for 7 generations, so he who killed him would experience a similar fate. Eventually, Lemech killed Kayin. He was the sixth generation after Kayin, but the seventh counting from Adam.
According to Torah Shleymah on our chapter item #114 G’d told Kayin that in consideration of the fact that he now displayed fear of and reverence for G’d, he would have his lifespan extended for seven generations. Onkelos explains the expression שבעתים as receiving punishment spread over seven generations. Just as Kayin’s eventual death was suspended for 7 generations, so he who killed him would experience a similar fate. Eventually, Lemech killed Kayin. He was the sixth generation after Kayin, but the seventh counting from Adam.