The autopilot on a modern airliner isn't a single system. Rather, it's a combination of systems which work together to control the plane.
I'm not particularly familiar with the 777 specifically, but in general, the autopilot of a modern airliner will be able to do four main different things:
- Keep the wings level
- Maintain or change altitude
- Maintain or change course
- Adjust engine power
These can also be used via the Flight Management Computer to fly a preprogrammed course at designated altitudes by way of a set of specified waypoints.
For example, if the plane is flying at a heading of 180°, and the pilot turns the heading knob to change this to 200°, the autopilot will make a turn to the right to come to the new heading. In order to maintain altitude during the turn, it will need to adjust engine power and/or pitch, because the bank to turn costs energy which ultimate must come from the engines.
However, it's possible for the pilot to disengage, say, the autothrottle, while leaving the rest of the autopilot turned on. If so, the pilot will be handling the engine power levers, while the autopilot might be controlling, say, the speed during a climb or descent so as to ensure that the airframe isn't overstressed. If the pilot then also pulls or pushes the stick or yoke, the altitude maintenance system might also disconnect, but the autopilot can still help the pilot stay on course. And so on.
Generally, the autopilot will disengage one axis of control when the pilot manipulates the controls that control that axis.
For example, if the pilot turns the yoke or pushes the sidestick to the side in order to bank into a turn, the autopilot will likely disengage the wings leveller, possibly after a delay where the pilot's inputs are considered a temporary override, but it might still very well be controlling the altitude and engine power. This provides a quick autopilot override; if you get a TCAS RA saying climb, you just pull the yoke or stick back, which overrides or disengages the part of the autopilot that maintains altitude, while still leaving the automatic course and engine power control active. Since the autopilot controls the throttle at that point, the pilot doesn't need to worry (much) about the speed dropping too far and getting close to a stall during the climb. (Correspondingly, if the RA was for a descent, the pilot wouldn't need to worry about overspeeding the plane.)