Why some women seem interested with you but then suddenly out of nowhere they start ignoring you?

It has happened to me lot and I can't understand why, I would be friendly, I might flirt a little and what not, and then out of nowhere they will start ignoring me, even if I am face to face with them. What gives?