Painting is a pretty deep topic, so I'll just mention a couple important points. Because you mentioned spray paint, I'm going to assume that, for whatever reason, using a traditional spray gun with a compressor isn't an option. But just so it's clear, that would be "the" best option.
- Used aftermarket part? Make sure there are no little cracks or bumps. Do any "heavy duty" work like sanding before hand. If you do any dry sanding, make sure there's no dust leftover. If wet sanding, make sure it's dry.
- Make sure the part is 100% clean, back and front. Any grease or dirt will prevent the paint from sticking -- including natural oils from your fingers. No matter what paint you use the piece must be absolutely clean. When you paint, get yourself a big cardboard box to paint on, and paint in an area far from anything that you don't want painted. (Over-spray and wind are not your friends)
- Use rubber gloves not just to keep your hands clean, but to keep your natural oils off the piece.
- Unless you're painting in the summer, or in a heated shop, bring the piece and the paint into the house for a few hours to bring both up to room temp. Cold spray paint sucks.
- Spray jet size matters. Spray paint from the store gives you a tiny jet of paint. This causes people to hold the can too close, laying the paint down in a smaller area, causing drips, etc. In other words, it will look like #$%*. Also, "bomb can" nozzles (the thing you push down) get clogged easily. Sometimes they spatter the paint too. Those little plastic things aren't really made for precision work. Maybe do a bit of research on which spray paint people like better.
- Spray paint doesn't hold up against any of our motorcycle chemicals either. Spill a bit of brake fluid or carb-cleaner and it's toast. Flat black will show every speck of road oil or bug guts. Not that you shouldn't do it, just letting you know.
- Clear coat? If it's going to be flat black, you probably aren't going to do this.
- I suggest using a single-stage paint such as PPG, not traditional "bomb can" spray paint, like Krylon, etc.
You can now buy "real" paint in a can. It's more expensive, but the nozzle delivers a bigger spray jet, they don't clog as much, and most importantly, the paint has hardener so the painted surface will be more durable. Basically, when you're about to paint, you "pop" a little button on the bottom of the can, releasing an emulsifier. You shake up the can to mix it up real well and then paint. NOTE that this can is good for 1 use, because of the hardener. This type of paint is sold at auto-paint shops, such as "Wesco" (not hardware stores or auto-parts shops).
FWIW, I used "PPG" brand, single-stage paint and it's lasted 10 years against grim, washing, waxing, etc. (Of course you won't be waxing flat-black. ;P )