Children can learn from a very young age how to wait their turn when others are talking. From a Montessori perspective, this is a lesson of Grace and Courtesy. In the classroom, we demonstrate to young children that it’s important to wait their turn and let others finish before talking. We show the child how to signify that they would like to talk without actually interrupting those who are talking. This allows the child to make their presence known (and validate the importance of their desire to communicate) while letting others finish.
If your child begins to interrupt verbally, gently guide her hand to your shoulder (or hip if you are standing) and gesture for her to wait with a signal. The first time, you can inform your child that you are talking (or doing something) and that you need her to wait for a moment; let her know that placing her hand on your shoulder or hip will signal that she needs something and will wait for your attention. Explain this the first time, but afterwards, simply gently guide her hand or tap your shoulder/hip to indicate what she needs to do.
After some time practicing and experiencing this, your child will begin to use this technique more successfully and wait for longer periods of time (you can stretch this out by responding more quickly the first few times and then having your child wait for longer periods as they become more able to wait). Each time your child interrupts vocally, simple remind your child again by guiding his hand or tapping on your shoulder/hip to remind him what to do. You can encourage your child to do this whenever he would like to talk to you and you look occupied.
Toddlers can be shown this as well, though it may take a lot more time and patience. Keep wait times short and respond fairly quickly. This will take a lot of repetition (of demonstration) and will be dependent on your child’s verbal skills, but it is something you can introduce.