There are different ways of handling this, and it's a good idea to discuss the pros and cons of each with your caregiver. If there's no threat to your health, you may choose to let the miscarriage happen on its own timeline. (More than half of women spontaneously miscarry within a week of finding out that the pregnancy is no longer viable.) Or you may decide to wait a certain amount of time to see if it happens before having a procedure to remove the tissue.
In some cases, you can use medication to speed up the miscarriage process, although there may be side effects such as nausea, vomiting, and diarrhea. If you choose to wait or take medication to try to speed up the process, there's a chance you'll end up needing to have the tissue surgically removed anyway.
On the other hand, if you find that it's too emotionally trying or physically painful to wait for it to pass, you may decide to just have the tissue removed. This is done by suction curettage or dilation and curettage (D&C). You'll definitely need to have the tissue removed right away if you have any problems, such as significant bleeding or signs of infection, that make it unsafe to wait for a miscarriage. And your practitioner may recommend the procedure if this is your second or third miscarriage in a row, so that they can test the tissue for a genetic cause.