I ride them normally the first 5 months of pregnancy. After that I ride them real easy. And the last 60 days I don't ride them at all.
After foaling, as nrhareiner said, give them at least 30 days to recover. I often wait 60. The baby can follow you as long as you are in a safe place and no other horses around. But be careful not to overdo the baby's exercise. They run and play just fine on their own, but can stop when they need to. If mom is running too much, they will run their feet off to keep with her and that is NOT good. So go easy and watch for signs of fatigue. Babies lay down often to rest. Not good to keep them up too long.
I wean at 5-6 months, but I have many friends who do it at 3-4. Kind of depends on the mare and the foal.