Every celestial body (Earth, moon, sun, etc) has a “sphere of influence” where the gravity from that celestial body dominates. So for example, for us on Earth, we’re still affected by the sun’s gravity, but the effect of Earth’s gravity is so much bigger than the sun’s that the vast majority of the time we basically ignore the sun’s gravity.
So when the lander is near the moon, it really only needs to account for the effect of the moon’s gravity. The moon has significantly less gravity than the Earth, so it’s much easier to take off from and land on than it would be on Earth. Similarly, orbits around the moon are much slower than they are on Earth.
As to how they were able to link up after leaving the moon, it’s just timing and math. If you know the shape of your orbit and the speed of your orbit, you can time how long it takes object A to reach a point, and for object B to reach that same point. Sync up those times and you’ve made a rendezvous
The entire lunar module were a two stage rocket complete with two main rocket engines and were filled with large fuel tanks, in addition to the astronauts and experiments. The first stage was called the descent module and was used to slow down the lunar module from orbit and eventually land on the lunar surface. This is the part that had the landing legs and a lot of the disposable experiment packages including the rover. The second stage was the ascent module and would be used to take off from the moon, leaving the descent module, and accelerate up to orbital speeds. This is the part that have the astronauts and living quarters.
The photos can be a bit confusing though. Due to the low gravity they do not need very powerful engines to land and take off. The orbital speeds are much lower then around Earth so they need a lot less fuel so the fuel tanks are much smaller. There is no atmosphere and the exhaust is invisible. Therefore what you see is just the ascent module lifting off the surface apparently by magic. But if you look at the ascent module it have a big circle on one side, this would be the fuel tank.
The moon is much smaller than earth, which makes its gravity much weaker, which means you go much slower to orbit it.
As an example Apollo’s lunar orbital speed was 3,600 mph. The speed of low earth orbit is 17,895 mph.
Sure that’s fast, but nowhere near as fast as Earth orbit and so much easier to achieve with a small rocket.
Latest Answers