There are a few main methods, I will discuss three. The first is good for branching corals. The second is good for xenia and other thin corals. The third is good for mostly stiff branching corals that have spicules: mostly Capnella (Kenya trees).
Method 1) Cut the bottleneck of a water bottle off, and keep the cap on. Turn the bottleneck upside down (the cap will be facing down) and fill with coarse live rock rubble. Fill with tank water. Put coral frags in it (space will be somewhat limited). Depending on current and other inhabitants, you may want to put wedding veil over open side, secured with rubber band. Some corals can attach in as little as two days; I wait at least three weeks. The rubble with coral on it can be glued to plugs or kept as they are.
Method 2) Have live rock rubble, wedding veil, and rubber bands. Place frag atop live rock rubble. Put wedding veil over it, and somewhat tightly secure with at least two rubber bands. Put in low current area and wait 2-4 weeks for frags to attach.
Method 3) Somewhat advanced method, but if done successfully, will achieve great results. Tie natural cotton thread into very thin needle. Push needle through one side of frag, around the rock twice, through the middle, around the rock once, through the other side, around twice, and tied up. Time consuming, but worth it. Wait one month/4 weeks or you can wait until the cotton thread dissolves into the water (this is safe as cotton is completely natural).
Add iodine supplements and keep the fragging-water warm.
Good luck.