Simply defined, a complex is just a set of thoughts, emotions and behaviors that are centered around a common subject. It is deeply integrated into a persons psyche and influences their behavior, emotional state and decision making on a subconscious level.
If you saw a man killed by a falling piano and every time you see a piano you are troubled by the set of emotions and memories that are triggered, or you involuntarily act out in some way that troubles you or others, you could be said to have a piano complex. ’
From there it gets a lot more complicated and depends on which school of psychology you ask.
If you were asking Jung, the pioneer of the term every sort of behavior would make you think a person has a complex. He theorized that we are all shaped by our complexes. It’s just a question of what they are and how we developed them. He also theorized that we have common, ancestral complexes that are innate. Freud would probably insist a penis was the cause of all complexes at some deep level. The two actually parted ways with each other over a disagreement about this very subject. Since those days the term has been popularly overused to mean any manifestation of distress, fear, anger, fixation or other response to a given subject.