This is just the very basics. There are people on the forum who can answer complex painting questions, but this is not a high tech job unless you are going for an award
for engine appearance. I suspect it's just ugly and you'd like it to look better.
Engine degreaser is a start, and less poisonous in confined quarters than brake cleaner. You may need a chemical paint stripper, which is nasty stuff. Sand (not wire brush) the metal surfaces with very fine (500-1,000 grit) paper, spray prime and spray paint. Avoid putting too much paint on at any point, so it won't sag. Use bunches of blue painter's tape to cover tightly hoses and other places you don't want to paint, and hang newspaper around the job, again taped tightly, because aerosol paint can really get into the cracks.
Paints? High temperature, readily available. Visit an auto parts
It won't take much to make it look a lot better. Aerosol paint disguises all sorts of sins. Just don't paint rust unless you have converted it with Corroseal of Ospho first.
Good luck with it.