1) When you find someone attractive, and want to convey that, without being a creep (scary, stalker-ish, etc.) There are a zillion ways to do this, but I think the key to all of them is that you make it easy for the person you're approaching to turn you down. Without -- THIS IS IMPORTANT -- any sense of physical or social danger to them, from you.
Physically, it's simple, you don't approach the object of your affection in a private elevator, or a hotel room, or any place where they have no easy option for escape, especially if you are bigger / stronger / male to their female. I'm a five foot tall woman, so I'm unlikely to physically dominate anyone, so I don't have to worry about that aspect as much as most. And even so, I don't leap on the object of my affection full-on, planting a big wet one on their face out of the blue. (My toddler son might do that, but I have learned over the years that that's not actually socially acceptable for anyone over the age of three.) I might lean forward, inch a bit closer, see if they respond by doing the same. There's eventually a moment of initiating physical contact, but I don't think I do that (I HOPE I don't do that) unless it's already very clear that they're interested -- and ideally, I'd like them to SAY that they're interested. I know some may feel that takes the magic, the excitement, out of flirting. I'm willing to trade a little of the excitement of uncertainty, the stomach-butterflies, for a cheerful and enthusiastic "yes!"
Even if I'm not physically threatening to anyone, I do still have to be aware of the social aspect. One way I approach that is if I'm the one to initiate flirting, I keep it light, so that they have the option of passing it off as a joke, changing the subject, wandering away shortly thereafter if they're not interested. If they ARE interested, awesome -- then they can respond by flirting back in kind, and after a few passes of the flirting ball back and forth, with opportunities to retreat clearly available, everything has intensified in pleasurable and exciting ways, and it's clear to both of us that we're on the same page here.
I am tempted to talk about specific incidents and people and name names, in part because I'd like to invoke them and let them respond to how successful (or not) I've been in the attempt to always give them a graceful exit. (I won't name names, because I didn't check with people in advance, but if you're reading this and I've flirted with you, do feel free to chime in. (Be kind. :-). I would really hate to think that somebody felt like I'd pinned them to the wall, metaphorically speaking, and made it hard for them to turn me down. Or at least, any harder than it already is -- because of course, it's hard, turning someone down. You don't want to hurt their feelings (women, especially, are heavily socialized not to hurt anyone's feelings, even at considerable cost to ourselves), and you're going to hurt them, at least a little. It stings, getting turned down.
The best I think anyone can do to defuse the potential difficulty of that, again, is to keep the stakes low. To flirt lightly, with a smile and a joke, and make it as clear as can be that if you do have to reject them, it's not going to break their hearts, and/or they're not going to come after you, angry at the rejection.
Oh, here's an incident I can talk about, since it happened in the other direction, and I think she'd be fine with it. In college, a female friend of mine, K, had been dumped by her live-in boyfriend. At a party, I said I'd heard about what happened, and asked if she needed crash space. K paused a moment, and then said, "Only if you know what you're offering." She said it with intent, y'know -- leaned in a little, smiled. I, totally flustered and totally not intending to flirt, stumbled a bit. She smiled again a moment later, a different 'friend' smile, said "Never mind, dear," (she may actually have patted me on the shoulder in avuncular fashion) and wandered off to the kitchen to get another drink. Now, in the end, I called her up a few days later and said, actually, I would be interested. I'd just needed a few days to wrap my head around the idea because, y'know, she was a girl, and that was new for me. Although thankfully, I didn't actually say that part out loud. And we did get together, briefly, and it was fun. The end.
I'm not sure if that story really illustrates what I'm talking about, but I think so. It's about making sure both people are on the same page, and K handling it gracefully, with minimal embarrassment to me, when I didn't respond immediately with an enthusiastic "yes!" K has, and had, a lot of grace. I didn't back then. Not at all. But I think that kind of social grace can be learned, fairly quickly, with a bit of deliberate conscious thought. Or at least you can learn to fake it if it doesn't come naturally.
As a side note, it's also easier to flirt lightly if you do it early. If you meet someone attractive, and you're available and they're available, by all means, make your move early. Because if you spend the next three years mooning around after them, building the potential romance up in your head, arranging your travel to 'casually' bump into them at conventions, etc., well, you've raised the stakes infinitely high at that point, and if she turns you down, you're going to have a mighty fall. And if you make that clear to her, if you open your suit, finally, after all those years of pining, with a declaration of undying love -- oof. That's going to be awfully hard for her to deal with, if she doesn't already return your affections.
You know, I read Regency and other period novels on occasion (especially if they have magic in), and one element that has always struck me is how formal society had sets of behavior in place to make offering graceful exits the norm. If the wrong man proposes marriage, there were accepted graceful forms for rejecting him, which he knows he's supposed to accept. They took it to extremes -- a man couldn't even approach a woman unless they'd been introduced by someone she knew. The entire society seems like it was set up to shield wealthy women from unwanted affections, which is sort of fascinating, considering how horrid its treatment of women (wealthy or not) was otherwise.
Anyway, I'm not suggesting we should return to that era, but I do think it can be instructive to look at those social forms, to think about what graces we've lost in our rush to modern familiarity. Just like if you're inviting someone to a dinner party at your house, it should be easy for them to turn you down with minimal hurt feelings all around, if you're inviting someone for happyfuntimes in your bed, it should be equally easy for them to turn you down.
2) The graceful exit apology.
This one is quick -- I've seen some people online sort of bewildered about what they're supposed to do if they've come on a bit too strong, and want to apologize, and don't want to be even more annoying / difficult with their apology. Might I suggest e-mail as a graceful option? The lovely thing about sending e-mail is that it's so low-key, so low-stress for the recipient, at least compared to anything you might say or do in person. They can respond if they want to; they can just ignore it. So many e-mails get ignored anyway! Another benefit is that you have time to craft your apology carefully, thoughtfully, and they have time to craft their response.
If, for example, you have creeped someone out at a convention by being a little too touchy or clingy or drunk all over them -- you could send a note right away, "Gosh, sorry I was such a drunken jerk last night -- I will try avoid pestering you for the rest of the con!" That gives them the option of being grateful that they don't have to actively hide from you for the next three days, OR, if they didn't actually mind the drunken pawing all that much, they can write and let you know that. Alternatively, you could avoid them for whatever remains of the con, let you both go home and retreat to a safe distance, before sending your note of apology. I think it's going to be context-specific which is the better approach, but it's something to think about.
There's a wonderful bit in Lois McMaster Bujold's _A Civil Campaign_, where Miles has badly and thoughtlessly mistreated the woman he's madly in love with. He's desperate to apologize to her, but she doesn't want to see him. His mother tells him, very firmly, to write the woman a note. And the book spends some time going over exactly what kind of note it should be, to make clear his regret for behaving badly towards her, without demanding forgiveness from her. Actually, that whole section should be required reading for anyone interested in this whole debate in SF circles; Bujold handles it beautifully, including giving us the woman's viewpoint, as someone who'd been in a bad marriage previously, and who had felt socially compelled to forgive bad behavior in her husband, over and over and over again. Those chapters are practically an object lesson in how to do apologies badly, and how to do them right.
Anyway, long-winded, I know. Short version: graceful exits are good; do your best to provide them. The end.