If you are trying to set up a butterfly mating and don't have time to wait around for nature to take its course, you can hand pair. When hand pairing two butterflies, you position the male and female bodies facing each other such that the male can easily grab the female's genitalia with his claspers - see this post to get a closer look at male and female butterfly genitalia.
I frequently hand pair individuals when I need to ensure the survival of a specific group of butterflies, this way I don't run the risk that a butterfly will die before mating takes place. Hand pairing also saves me time and energy; I could either set up four cages with four different couples and hope for a mating to occur naturally, or I can hand pair a single couple which usually leads to fertilized eggs within a day or two.
How well hand pairing works depends on the species. Some butterflies are significantly more difficult to hand pair than others. Sometimes this is due to their size as they are simply so small that it is difficult to handle them. And sometimes their mating strategies involve specific courtship rituals which are not performed when hand pairing. But for many species, including monarchs and swallowtails, hand pairing is a great way to get your next set of eggs a bit faster.
Probably most important when hand pairing is to convince the male to open his claspers. There are a number of ways to accomplish this: 1) use a paint brush to lightly brush the male's claspers 2) rub the abdomen of the male against the female's (my personal preference) or 3) place the male in a refrigerator for a minute or two. Number 3 is usually a last resort for me as it takes the butterfly some time to recover and actually clasp the female's abdomen. If the female is too active while you are trying to get the male to attach, you can also cool her down in the refrigerator for a few minutes.
No matter which method you use, any movement of the male's abdomen or claspers is a good sign that he is interested in mating, so keep trying! Sometimes it takes a few tries for the pair to get in the right position.
I'm also including a brief video below of my favorite method for monarchs, rubbing abdomens, as well as this link to a video of the paint brush method.
A couple things to consider before hand pairing:
1. How old are your butterflies? It is always better if the pair of butterflies are in their prime. The very newly eclosed (emerged from their chrysalis) and oldest butterflies might pair but not produce any eggs. Often this means that the male did not successfully transfer a spermatophore to the female, without which she cannot fertilize her eggs.
2. Have either of your butterflies mated before? In some species, males know when a female has mated before which could make him less inclined. If the male has previously mated, he might not have a new spermatophore yet. Spermatophores are very large constituting 13% of the male's weight in some species.
Finally, patience is key! You might have to experiment a bit to see what works best in your species.