The absolute best way to have food for a long roadtrip is to have a small fridge that plugs into the cigarette lighter. Unfortunately, this requires both a large, roomy car and a small fridge that can plug into a cigarette lighter. Many people don't have one or both of these, and nowadays there are many more uses for the cigarette lighter than having it occupied the whole time by a fridge, so the next best thing is a good cooler.
Mine has a flat-top hinge lid, which is easier to open and close while driving than the pushbutton swivel kind. I have a water bottle that screws into the lid, which starts the trip frozen. I also have several small gelpacks that thaw slower and can last up to 12 hours, which I place at either end and along the bottom. They make soda-can-shaped freezepacks meant to be placed between cans, but in my opinion those take up too much room that could be better filled with edibles. The cooler itself is large enough to hold up to eight cans of soda (or juice, or other non-alcoholic beverages) and leave a small bit of space at the top. Usually I bring four drinks at most and fill the rest with food.
The best road food comes in bite-sized pieces that can be eaten one-handed, requires no utensils, and is not too messy. Anything with a runny sauce is right out. Good choices are carrot and celery sticks, bananas, dried fruit (raisins, craisins), most nuts (not pistachios still in the shell), some types of chips that aren't too crumbly, pretzel sticks, popcorn, meat jerkies. (I'm not sure candy counts as "food.") Sandwiches work better cut into quarters and with nothing in them that will drip. Pepperoni or salami are better than other meats because those won't spoil instantly if left in the sun on the dashboard or passenger seat instead of properly put back in the cooler while not actively being eaten. I often bring a bag of pizza-sized slices to eat by themselves instead of bothering with a whole sandwich. Some wet fruits will work, such as strawberries or apples if there is a paper towel to catch any drips. Oranges will not; too much peeling. Yogurt will work if there is a good cupholder to put it down during bad traffic.
Hot food can also be bought on the road. Plain (no sauce) chicken nuggets and french fries are good. If it's something that can't be put down on an unstable surface or in a cupholder between bites, park the car somewhere first.
Aside from the food itself, bring a whole roll of paper towels. They're good as napkins and you never know if you might spill something. Have an empty paper bag for trash - paper because those are easier to reach into one-handed without looking, as they stand open all by themselves. If there will be a lot of wet trash, put the paper bag in a plastic bag. Place the cooler, paper towels, and trash bag all within easy reach of the driver seat.
All of the above, of course, is intended for long road trips with only the driver in the car who is trying to cover the maximum possible distance in a minimum amount of time (that is, no stops longer than 10 minutes). A much wider variety of food is possible if there is someone else to open packages and keep things unlittered, or if meal stops are planned in. Also, much of what I do is geared toward not making a mess in the first place rather than having to clean up afterward.
This post is dedicated to bakho, who thinks I post too much about food, and Rebelcat, who thinks I post too much about cars. :)