Before you try to paint the walls, you must properly prepare the wall and the most important step in that is probably to properly clean the walls of all the grease and smoke and dust that they collect over the years.
Regular detergent tends to leave a soapy residue, even after careful rinsing, and that doesn't help the paint to stick.
For years the standard cleaner has been a corrosive power called TSP, or Tri Sodium Phosphate. It works really well, rinses off well and actually etches the paint a bit. That is why it has been the standard for so long. Now you can get it pre mixed in a liquid so you have it the proper strength for prepping walls.
But even more interesting, they finally have products called "TSP Substitutes" that are phosphate free, following the movement of laundry detergents away from harmful phosphates. The phosphates aren't really harmful to you, but they wreck havoc on septic and water systems.