These forms of aggression usually occur in cats that are insufficiently socialized—often removed from their mother and littermates (earlier than seven weeks). When growing up, the social game changes into prey-like play. When there is insufficient inhibition (e.g., correction by the mother), this can become increasingly severe.
Prevention: keep as long as possible with mother and littermates, never play with hands but with toys on a string and correct when playing too hard.