Try riding on edges of sidewalks(where safe of course), down small flights of stairs( I started out at 4 stairs), off sidewalks. Practice doing bunnyhops in the grass where it won't hurt so much if you fall.
For sand/mud/trees, I would say you just have to go out and ride. If(or when) you fall, try to hold your hands in close to your body and land on a shoulder and roll. Thats what I do and it has worked fairly well. My shoulders get bruised and scarred, but I figure it's better than breaking my hand/wrist right?