You should never give up if you like them a lot and you REALLY feel you need that person to be apart on your life (You should be compatible of course). Maintain contact, but don't initiate, let them come to you, let them know about you, share who you truly are and get to know them too! Then they might change their mind, sometimes it will require patience, but as I said, if they are REALLY worth it, go for it.
Just don't hang on them for ever. Maximum of 8 months (if you are willing to wait so). Some people don't even wait longer than 4, but at the end if they don't change their mind. Then DROP it COMPLETELY! Break all the contact, and simply forget them. It's the best you can do for your own health and sanity :)
I would say it has a little to do with context. If you have just heard someone say they like being single it could be that they just fear rejection, and don't actually want to remain alone, so there is nothing wrong with asking them out once to make sure. If a person has clearly been rejected, then they should respect that persons wishes and leave them alone.
No, if I love her really I wouldn't give up... Now, I love a girl but she has a boyfriend. Naturally I am desperate but I never give up to love her... If the love is real, there's nothing can prevent one's love...