Niyoga is an ancient practice from India where a woman who could not have a baby would ask a man she trusted to help her get pregnant.
Imagine if you wanted to have a baby but couldn't by yourself, you might ask a friend or someone you knew really well to help you. That's kind of like what Niyoga is.
Back in ancient times, women in India who were having trouble getting pregnant would ask a man to help them have a baby. He would donate his sperm (which is what makes babies) and then there would be a baby growing inside the woman's belly.
This was a very serious decision for everyone involved, and it was taken only if couple failed to have a baby even after trying for a long time. It was important that they both agreed to it and understood that they would need to take care of the baby together.
Even though Niyoga is not practiced much now, it was an important way to help people who wanted a family but couldn't have one on their own.