A man pleaded guilty Wednesday to killing four family members, including his two young children, at their home north of Boston two years ago after he and his wife argued over a bounced check.