Custody of children

Custody of the children and providing maintenance

Q: In the case of divorce, which parent has the right of custody of the children and up to what age? If a certain parent has the right of custody then can that parent prevent the other parent from visiting the children? Similarly, I would like to know which parent has to provide maintenance for the children. If the children have wealth, can their wealth be used for the maintenance? What exactly does maintenance entail and will the expenses of the children's education also fall under maintenance?