what is the situation? Are we talking about bar pick up, random encounter at a library/bus/store, or something else?
What context of conversation are you having?
In many situations-attention, once you've satisfied her craving for attention that's her excuse for cutting you loose. Stay cool, the involved girl today might be the single girl that remembered how nice and flattering you were and you might get another chance.
Possibly she is looking for some strange or she is lying to you and at some point you screwed it up, there were studies that women know if she is going to sleep with you within the first 5 minutes of meeting you, if she has no interest after that 5 minutes then you did something to screw it up. If that is the case, figure out what you are saying or doing wrong and stop doing that. I used to have this problem and realized if I for the most part keep my mouth shut, smile and nod a lot I was increasing my frequency of sex a lot.
Possibly you are misreading her interest, some women just want to talk to someone to vent about something. I remember one night at a bar when this smoking hot woman starts talking to me at the bar out of the blue and she is going on about everything, she even goes on about a book she just read and asked if I'd like to borrow it. I took this as a sign she was interested, then she says something about her fiance. I didn't get pissed, I stayed cool about it and asked about her relationship and let things run their course. She thanks me for the conversation then gets up and leaves. Few minutes later another girl that was within ear shot comes over tells me how she heard what we were talking about and wanted to talk to me but thought she and I had something going on, when she heard she was engaged and saw her leave she wanted to come over and talk to me. So things worked out.
So remember to always watch yourself because even if things don't work out at first if you carry yourself right another opportunity might work out.