How soon you can ride your mare after birth depends on several factors including whether the delivery was difficult for her and the type of condition she was in before giving birth. A mare who was not ridden the entire time she was pregnant should not be put into work soon after giving birth, but a healthy mare who had an easy delivery and was only out of work the last month or two of her pregnancy can start to be ridden within a week of giving birth.
You cannot separate a foal from a mare for riding- especially the first few months- so only ride in a safe, enclosed area and keep an eye out for the foal! Bring your mare back into work gently, and don't ride your mare more than her foal can keep up!