I thought this was a good question and wish one of the big iron pilots on the Dope had answered it - maybe the guys like pilot141 are on duty. Anyhow, I’ll take a stab at it, in part to bump it, and see what happens.
You say “military jets’” and “commercial jets” but that’s really quite a big range of stuff, with some considerable overlap. I’ll assume you meant the difference between, say, a Boeing 777 or modern Airbus and an F-16 or some such.
Those machines are “fly by wire”. The controls manipulated by the pilot are not directly connected to the items that actually physically steer the airplane, and these days there is some computer intervention between pilot and the end result. The degree of this intervention can range from the computer merely making sure the pilot doesn’t do anything really stupid to break the airplane and evening out the control inputs for smooth motion, all the way to the pilot’s role being to make suggestions and the computer deciding whether or not to act on those suggestions.
Now, all of these planes you’re referring to have autopilots that can maintain course, airspeed, and altitude - heck, even a 40 year old prop-driven Cessna 172 can be equipped with that. This is pretty basic stuff. And such autopilot systems will typically be set to deactivate themselves if the pilot grabs the controls and makes a motion of sufficient magnitude, or if something like turbulence causes drastic changes in attitude, at which point the human is supposed to take over. For instance, if that Boeing or F-16 is humming along on course and our previously mentioned C172 wanders into its path, the pilot will (I hope) see it, take the controls, alter course to avoid a collision, then return to the prior course when the danger is past. You don’t want the autopilot fighting the pilot in such circumstances, hence it deactivates.
There are systems in use today that allow an airplane to take off, fly a course, and land itself all without a human touching the controls. (In which case the pilot monitors the system to make sure it continues to function properly, and is there just in case the triple-redundancy systems fail.) But such systems only work when there is not a need to change the mission en route - at the very least you’d need a way to input a new course and such. But on something like an air attack you just can’t plan a set course, in which case the human being is better suited to the task of guiding the airplane.
However, for an aircraft like an F-16 which is inherently unstable (that’s what gives it such manuverability) and has the power to rip itself apart if mishandled, you will always need that computer in the loop. If the computer fails completely the human alone can’t keep it under control. So it’s really a partnership between man and machine, with one or the other having more say at any given point, but both of them being required.
That’s as of right now. Already, many spyplane functions are being taken over by remote control drones that can do much of the flying themselves. These still require a human in the loop (if not the cockpit) because the drones can’t see things like birds and other aircraft in their way and need a human to take care of such things from time to time. The military is currently trying develop systems that can detect other airborne things and the software for the machines to avoid them on their own. If successful, such systems may filter down to civilian aivation and result in airliners that fly themselves. How far off is that? I don’t know.
And that’s my poor and vague attempt to answer your question. Hopefully, someone who knows more details will be along presently.