Dream is considered a voluntary reprocess of memorized daily experience and mind.
Your dream suggests that you were (are) afraid someone or something at the moment. Or, someone/something has hurt somebody you knew and you think you could be in danger too. The one who was killed in dream is not necessarily the same person who was hurt in real life. But, it implies the one who was hurt in real life has similar closeness with you as the one in dream.