In the Oedipus complex, a boy is fixated on his mother and competes with his father for maternal attention.
The opposite, the attraction of a girl to her father and rivalry with her mother, is sometimes called the Electra complex.
At some point, the child realizes that there is a difference between their mother and their father. Around the same time they realize that they are more alike to one than the other. Thus the child acquires gender.
The child may also form some kind of erotic to the parent of the opposite sex. Whilst their understanding of the full sexual act may be questioned, some kind of primitive physical sensations are felt when they regard and think about the parent in question.
The primitive desire for the one parent may also awaken in the child a jealous motivation to exclude the other parent.
Transferring of affections may also occur as the child seeks to become independent and escape a perceived 'engulfing mother'.
A critical point of awakening is where the child realizes that the mother has affections for others besides itself.
Primitive jealousies are not necessarily constrained to the child and and both parents may join in the game, both in terms of competing with each other for the child's affections and also competing with the child for the affection of the other parent.
Note that opposition to parents may not necessarily be sexually based -- this can also be a part of the struggle to assert one's identity and rebellion against parental control.