There are many different ways of enjoying anal sex; digital stimulation (around the anal orifice, inside the canal against the prostate or G-spot), oral stimulation (rimming), use of toys (plugs, vibrators, or dildos),or penile penetration. Women can use a strap-on for pegging.
Relaxing is very important, and remembering to bear down to help the external sphincter to open for insertion.
Maintaining hygiene is also important in anal sex. Having a good bath/shower is a good idea before hand, and some people prefer to either have a bowel movement before, or an enema to evacuate the rectal cavity.
Due to the delicate tissues involved, tearing is possible and there is a chance of sexually transmitted diseases through semen and blood. Using condoms is highly recommended, and of course, using high quality silicone lubricants. Avoid petroleum-based lubricants because they can cause the condoms to tear, and water-based lubes tend to dry out quickly. Those with glycerine might cause some abdominal cramping. Remember, if toys are used, be sure that the flange is large enough that the toy will not completely enter the anal orifice. Some people use numbing creams, however, these could deaden the area too much, and then injury can occur because you wouldn't feel it. Finally, remember the "pink to brown" rule: it is ok to switch from vaginal to anal sex, but not the other way around, because of the possibility of microorganisms than can be passed from the lower digestive tract to the vagina.