Water changes are almost what they sound like, you're changing the water in the tank. But, with very few exceptions, you never want to change more than 50% of the water in the tank. Heavy water changes can cause the fish stress, and should really only be done in emergencies. Even if there is a problem with the water parameters, I've found that only doing a 30-40% water change once a week can resolve the problem quickly with less stress than a sudden 60-70% water change.
Generally, a normal water change is replacing about 15-20% of the water in the tank about once a month.
What I do is I first take the water I'm going to put into the tank, set it aside in a 5 gallon bucket, and treat it with water conditioner. I'll let it sit for a couple hours before I'm ready to perform the water change, to give the conditioner time to work. If I'm doing a water change for my 55 gallon tank, and I usually replace 10 gallons at a time, I'll get water ready the night before, do the water change, then prepare another 5 gallons to change at the end of the day. For my 10 gallon tank I use a large mason jar.
All I use to take water out of the tank is plastic tubing you can find at any hardware store. I stick one end into the tank, and the other end in the bathtub or sink, and siphon water out that way. If you have a faucet that you can screw attachments to, you could use a gravel vacuum, which creates suction as you run the faucet, sucking out water.
Those are really nice because you can clean all the gunk and waste out of the gravel, and take away some of the water at the same time. There's also one that works with a hand pump if you don't have a faucet that allows attachments.
After you've taken the water out, all that's left is putting the new water in. It's a little bit of a chore but it does help keep the fish happier and more active, which is why we keep fish in the first place.
Note: I know some people who put water straight into the tank then treat the whole tank with water conditioner, or treat it outside the tank but put it in immediately. I don't agree with those methods because it's introducing chlorine to the tank for no reason. Even though it will disappear when the conditioner finishes it's work, it will still cause the fish some unnecessary stress.
For Saltwater tanks:
Everything is going to be the same except that it's incredibly important that the water be treated with water conditioner beforehand so as not to stress the fish, but also not to kill the coral and live rock, as they're extremely susceptible to hazardous chemicals. It's also incredibly important that not only the salinity, but also the temperature of the water matches the tank's as a sudden rise or drop in either will harm the fish and kill the coral/live rocks. Note: If you're aiming to rise or lower the salinity levels you can do a water change with water that has a slightly higher or lower.
Final Note: An alternative to treating the water with water conditioner, you can install an RO/DI Water filter in your house and use that directly, as it filters out the chemicals that are harmful to fish. The reason why most people don't do this is because it's expensive. Most pet stores have RO systems installed, and will most likely let you fill a container and take some home provided you're polite and don't get in the way of employees and customers.