Actually, the Hebrew does not say ‘mark’: it says ‘sign’. There have been all kinds of suggestions made as to what this was.
Cain feared that his life would be taken, and God by this mark confirms that indeed, that was a danger. Later, after the flood, God instituted the death penalty for murder (Genesis 9:5-6), but that was to be carried out by duly appointed authorities, and the implication is that there should be proper enquiry and a justice system to investigate, hear witnesses, and pass sentence. The danger that Cain faced was that every individual might take the law into his own hands in the way that Lamech did later. God hates murder and the continuation of Cain’s life was not intended to teach that the Lord was indifferent to what he had done, but to set him on display for all the world to be horrified at his crime. Therefore in order to dissuade any from following Cain’s example, God somehow warned those alive at the time that any similar act of violence, even against Cain himself, would be met with still greater severity by the Lord. Cain is presented to us in the New Testament as an object of warning, as one whose wickedness is characteristic of the sinful nature and who expressed his murderous hatred in this awful way, early in the history of mankind (1 John 3:12; Jude 1:11).