Cain's killing of Abel was an "accident" in the sense that he didn't know the blow would be fatal; no one had experience with such things! His punishment was exile, which is in fact the standard punishment for
accidental manslaughter (Num.35, Deut.19). According to the Midrash, Cain was later accidentally killed by his descendant Lemech (Gen.4:23-24).
Ask a follow-up question