It can lead to low self-esteem, depression, and chronic misbehavior. It's important for both parents to tell the children, again and again, that the parents could not get along for grown-up reasons, nothing to do with the children. This message can be reinforced, oddly enough, by keeping your discipline consistent. Because then your child sees that he can't push you around or control you - that the adults really are in charge of things. This also helps kids to feel more secure, and less likely to cling to irrational guilt.
Kids also have a hard time adjusting to the logistics of parental separation.
Home used to be where the heart was, and where the house was - all in one place. It's bad enough that you don't know where your bedroom is. Children can feel torn apart when their parents don't help them with these questions. Unfortunately, some parents do things that make it much worse. It is all too typical for a parent to bad-mouth the ex in front of the children, forgetting that children love and identify with both parents, not just you.