I like to take my dremel and make an appropriately sized hole about 1/8 to 1/4 inch deep where im going to put the coral, then on the rock(dry rock if possible, not dead dry but go ahead and rub the spot with a towel....it helps)
allow the glob of glue to set for about 30 seconds or so before placing the coral on it. Try to dab the end of the coral you are going to glue dry and if it is still wet or dripping water and or slime, hold it upside down for a few or use a qtip to catch the excess water/slime or it will mix with the glue and dilute the sticking power. Its also not a bad idea to put a dab of glue on any openm wounds you may have created or see, it kind of makes a band aid so algae and critters cant so easily get inside and do any damage.....
That is for stonies or lps skel;etons etc...
for softies the key is just to allow it to set and then just make sure you dont put it in a high flow area as you are just trying to give a day or two to stick on its own.
In either case, keep in mind that the glue will kill and burn what it touches so you really want to be fairly precise about where you are getting it...zoos, fo rinstance ar pretty tough, but if you get that glue in their mouth or on a signifigant amount of their body they are toast........