In Sophocles’s play Oedipus Rex, Oedipus was a young man who killed his father and married his mother. Thus, Freud used the term “Oedipus complex” to refer to the sexual attraction a child feels toward the parent of the opposite sex. He also used it to refer to the jealousy that child feels toward the parent of the same sex and the resentment that child feels toward that parent for having to compete for the father or mother’s affections. Sigmund Freud formulated the concept of the Oedipus complex in the late 1800s, and he described it in his classic work The Interpretation of Dreams, which was written in 1899.
Much of Sigmund Freud's work focused on the development of a theory of psychosexual development. An Oedipus complex typically refers to a boy’s erotic attraction to his mother, and an Electra complex refers to a girl’s erotic attraction to her father. According to Freud, children have these desires but repress them, but even though they’re repressed, they play a defining role in the child’s sexual development. Freud’s theory of the Oedipus complex was highly controversial and much has been written that explains different criticism and support. To help you develop an opinion on the theory, I’ve provided a few links to articles that shed light on the controversy.