I think it's different in different situations.
If you know this person a really long time and you hang out with her all the time, you should give her some space. Don't flirt too much (or even at all) and just be yourself. If she likes you she'll be afraid of loosing you and she'll perhaps do something to prevent that from happening (if not then I suggest you just tell her how you feel).
BUT if this girl that you like came into your life suddenly and you don't see her that often, then if you don't keep in touch at all and it seems like she's loosing interest she'll completely lose that interest if she doesn't hear from you at all. (given that she has a life, sees other people.another prospect may appear).
Personality plays an important role in these situations, that's why it's always different.
For a guy, it's mostly the 'leave alone' part that works. If you leave him alone, he'll go crazy about you.thinking what it is you do when you're not with him, are you thinking of him and if not, then why not.
For a girl, she likes to be pampered, or at least shown that you've got an interest in her as well, because if you just ignore her, she'll likely move on, because she doesn't want a guy who'll just string her along for enormous periods of time without her having something 'to show for' (meaning ultimately a relationship).
First sign of someone losing interest in you is if she doesn't call you as much as she used to, she doesn't text you, contact you in any way. (If she does it's mostly really short and kind of just a formality). She just doesn't contact you as much as before. She sometimes doesn't answer your calls or text messages. When you try to contact her she won't exactly run over to the phone to answer it (like she used to).
She'll be colder in everyday conversations, or she'll talk about what's going on with her (and mention a guy-who's real btw!-) hehe.
She just doesn't even think about you almost at all any more. You'll know this is happening if when you call her, she answers and doesn't recognize your voice or it takes some time for her to remember who you are.
There are many signs. I just can't think of them all right now.