This site, with what looks like a header ripped directly from the cover of a Harlequin romance novel, has advice on getting a boyfriend back. Most of it sounds dead on.
The single distinguishing factor is whether you were the dumper or the dumpee. If you dumped him, and then changed your mind, you have better chances. Move fast, however, because you don’t want him to get over you, or find somebody to take your place.
If you got dumped, however, there’s one big word I’d recommend to you: change. Change your lifestyle, your attitude, your circumstances, or whatever you find that came between you. Then try once, and only once, more. Anything more than that is just too creepy. Rejected twice, and you’re just going to have to cuddle with the boyfriend pillow until you’re back on your feet.