Acrylic paint does not adhere well to metal, and sometimes plastic, no matter how clean your miniature is. Primer creates a bond to the model that gives the acrylic paint something to hold on to in order to stay on the miniature. It sounds like a simple concept, but it is very important to maintain the health of your models paint job. Not only is it important to prime your miniatures, it is important to prime them the correct way. Just make sure to do it outside or in an extremely well-ventilated area.
Now, there are some misconceptions about priming that should be addressed here regarding. You do not need to spend a large amount of money on primer specifically for miniatures. While they are great products, they tend to be rather expensive for not a whole lot of product, and they can be difficult to locate locally and sometimes even online. You can get wonderful priming results with nothing more than a rattle can from your local hardware store. This is far easier to obtain, and much lighter on your wallet. Stick to matte or flat colors, and stick to spray cans that are specifically primers. Krylon and Velspar make great primers for metal and plastic, but really any brand will do as long as you get flat finish primer. Colors are up to you, but bear in mind that anything you use as a primer acts as an under coat to the miniature. This will affect how your paint looks on the miniature when it's done. My recommendation is grab a can of flat black and flat white. That will cover almost all of your priming needs for a long time to come.
How you prime your miniature matters far more than how much you spend on the primer. The first mistake most people make is to over prime the miniature, giving it a plastic like sheen and smoothness. This leaves too much primer on the model and obscures any details the model has, on top of not giving your paint a surface it can cling to. This is a situation where less is more, and you want to keep that in mind as you spray your models. It is OK if some metal or plastic shows through, you do not need to cover every centimeter of the model. Instead, you will take care of that through normal painting. Your goal is to have the model feel almost as if it is covered in very fine sandpaper, as this will give the paint something to cling to.
Here's the method I was taught, and over the last twenty years of painting, it has yet to fail me. Hold the model out at arm's length in your non-dominant hand. Then, using your dominant hand, start spraying with your rattle can. Move your dominant arm so that you bring the can across the model with a light dusting. Continue to do this while turning the model in your hand to get at all sides. Do this until most of the model is covered, and don't worry if you see a little metal or plastic peaking through in hard to reach areas, that's quite alright. This allows the primer to build up in very light layers that dry quickly, and it allows you to easily control the spray of the pain on the miniature. When you are done, run your finger lightly over the miniature, if it feels slightly rough, you've got it perfectly.
A slightly more advanced priming technique is to use two colors, black and white, on the same model called double priming. To do this, you follow the same steps as above with a few simple variations. First, using the black primer, tilt the model slightly away from you. Follow the steps above of moving the spray can across the model while turning the model to ensure coverage. After you've laid a little black primer down, tilt the model towards you and follow the same steps as above with the white primer. When you're done, you should have a two toned model. The benefit of this is that you just created a natural shading on the model through priming. Colors will appear darker from lower on the model and the bits that got the dusting of white from the top will appear brighter. This natural shading actually saves you time and effort later and helps to give your models a more well-defined look in the finished result.
Try this out on a few models that you really don't care too much about first, just to make sure you got the technique down. When you are happy with the texture you are achieving, you can safely start priming regular miniatures. As a reminder, with spray cans, make sure to do a couple of test sprays not directed at the model in order to make sure there are no clogs. Spray cans have a tendency to clog after some use. These few tips may seem odd at first, but they will help to make sure you have a great starting point to have fantastic looking models on whatever battlefield you choose to take. You will find your models are more durable, look better longer and will be the way to being the envy of all your opponents.