You and your baby will determine when to wean. There's no set time for this. Some children are breastfed longer than planned. But it also depends on your needs.
It is common for many babies to need follow-up feedings after six months to continue their development. Breast milk should gradually be replaced with baby food. This is the most natural way for healthy weaning.
You can continue to breastfeed your baby with the rest of your milk as long as you and your baby want to. If you have to wean, or you want to slowly (weekly) replace breastfeeding, you can do so by combining a meal with formula.
If your baby refuses the "new" milk or nipple, try giving pumped breast milk first or wetting the nipple with breast milk.
When your baby gets used to the bottle, give him/her a taste of the formula. You will notice that your milk supply will decrease as your baby's sucking decreases.