Weaning a breastfed baby at 10months old
First off, babies need either breast milk or formula until at least a year old in order to get all of the necessary nutrients for healthy growth. If you're weaning from breastfeeding at this age you should still give them formula rather then cows milk or other milk alternatives.
The best thing to do when weaning any child is to do it slowly. First, start pumping so that your child gets used to taking milk from a container rather then the breast. Pick one nursing a day to give them a bottle/cup instead. Once they're okay with that switch another nursing session for a bottle/cup. Continue until all breast milk is coming from a container.
Once they're used to that start mixing the formula with the breast milk so they get used to the flavor. Watch for reactions in case they are sensitive to that kind of formula (same goes for an older child that is weaning to cows milk). Slowly increase the amount of formula and decrease the amount of breast milk until it's all formula. Decrease how often you pump at this time as well to slowly decrease your milk supply. This way you can avoid painful engorgement.
It takes time but doing it right is better in the long run.