Depends on the type of paint. For Krylon and such soak the spray nozzle is laquer thinner or mineral sprits for a few minutes. Other option is to grab the nozzle off another can and just use that. In the future if you turn the can upside down and spray for a few seconds after you are done each time it will clear out the paint and prevent it from clogging.
Usually the clog is at the opening in the push nozzle where the paint is sprayed out onto your work.
You might try using very fine wire and slip this into the nozzle to physically remove the dried paint. Then as already pointed out, when done spraying turn the can upside and and spray until all that comes out is propellent.
Take some goof off and wipe the spray nozzle to clean it up. Also remove the nozzle and pour a little of the goof off in it and let set just for a minute ore two and it should clear up the spray nozzle. Later RJD
I have had the best results painting the rail after inserting it in the ties and bending to shape. Just hold can at a low angle and spray from the side. No problem if you spray some on the ties, just gives them some needed weathering. I get a nice rusty color by spraying a base coat of red oxide then spattering on a light coat of flat black and grey primer. Paint doesn't stick well to aluminum and will start flaking off in 2 to 4 years. Might get better adhesion if you wash the rail in your bathtub with some soap and water, then soak it in some vinegar water, then air dry thouroughly, but that is too much bother for me. Rubbing some candel wax on the side of the foot of the rail makes threading the rail in the ties alot easier but of coarse doesn't help holding the paint.
I've had lots of cans clog up long before they're empty, and it's almost never the nozzle. I've tried replacing the nozzle with a new one but still no luck, so the clog is somewhere in the can's valve. I've never found a solution to that problem. Really sucks to have to throw away a nearly full can of paint!
This has happened to me with shaving cream and Roundup (the spray variety with hose); nearly full both containers; very disheartening. Almost feel like getting the ax out and breaking it open but then it might explode and I'd be the worse?
I used to have the same problem--made me really mad. Since I have started turning the can upside down and spraying just propellant thru the nozzle after each use I seem to get most of the paint out. I do have an occasional can that has paint left and no propellant left--especially if I use the can for a few small projects. Guess turning the can over and sparying only propellant is responsible for that--guess it is 6 or 1/2 dozen of the other in that case. Damned if you do, damned if you don't