Invisible

Why do we do this? Sometimes we are so in each other's faces, and we play, and flirt and everything is fine. Then other times we act like the other doesn't exist. During those times it's almost like we're invisible to each other. It drives me crazy. Why do we do this to each other, to ourselves?