There is more than one way to do it, and many have their own personal way, but here is one very good way to prepare your pointe shoes.
First, fold the heel (the part of the upper that runs behind the heel) of the pointe shoe inwards, aligning the back seam and the sole. As you hold the heel down against the inner sole, take a pen and draw a line from the centre of the heel toward the side of the shoes. The best way to do this is to push the tip of the pen against the inside of the folded part and pull it outward.
When you buy ribbon for pointe shoes, the ribbon usually comes in one piece. Cut this into two pieces (no, not four!) and place the centre of the ribbon on the inside sole and align the ribbons with the lines you have drawn on the inside of your shoe. Make sure that the ribbon is aligned to the front of the lines, i.e. the whole width of the ribbon should be placed on the toe-side of the line drawn.
Sew the ribbon using a doubled-up thread. You cannot sew the part of the ribbon that is in the middle (as it is on the hard inner sole) and you will just have to leave it as it is. However, be careful to ensure that the middle part of the ribbon does not become shorter than the inside width of the shoe. This might seem obvious, but if the ribbon is pulling the sides of the shoes together it not only prevents the shoes from fitting against your feet closely but can also lead to them becoming twisted. It will also increase the chances of some of the stitching coming undone while dancing. The ribbon on either side of the sole should be sewn all the way around its edges, i.e. there should be a rectangle of stitching from the top edge of the shoe to just above the inner sole. Some people sew only the top of the ribbon by the rim, but this is not necessarily secure, and does not necessarily keep the shoes properly on your feet.
Some dancers use only elastic with their shoes, but this is not advisable. Elastic has too much give and the pointe shoes should be fitted firmly to your feet.
However, using some elastic for added security is a good idea. Sew a piece of elastic, long enough to go around your ankle, onto the shoes. The best place is just on either side of the seam that runs along the heel. An alternative is to sew a very short loop of elastic just long enough to reach from the heel seam of the shoes to the back of the ankle (behind the achilles tendon) and thread the ribbon through it as you wrap it around your ankles. The heels are pulled up by the ribbons around your ankles and you do not have to risk the discomfort of having elastic around your ankle as well as the ribbons. (Appendix: https://kodamaballet.wordpress.com/2014/02/11/how-to-sew-ribbons-on-your-pointe-shoes-appendix/)
Whether you use elastic or not, it is a good idea to either rub your heels in resin or put a little water on your heels to stop the heels of your pointe shoes slipping off.
In order to keep the pointe shoes neatly hugging your feet, you can use thick cotton thread to make a “cat’s cradle”. You do this between the sides of the U or V shape at the upper front part of your shoes. You start with one side, about half way along the arch of your foot, pick a point on the other side of the shoe close to the point of the U or V, and then pick a point on the initial side a little closer to the front of the shoe than your initial point, followed by another pick on the other side a little further back from the middle of the U/V and so on. You will end up with a slightly higher than original line on the front of your feet in a slight V shape, which provides extra support and prevents your shoes from pulling out too much. This should be done with your feet in the shoes so you know how tight you should pull the thread (be careful!).