Deworming is different for everyone. Personally, I am not a fan of deworming unless necessary, so I only deworm if I have seen a positive fecal sample (and in the case of coccidia, also see symptoms). I know the new chickens I just picked up have worms because I looked at a fecal float and I saw roundworm eggs and whipworm eggs. I know that my established flock has coccidia because I saw it in a fecal float. I also know that coccidia is common enough in chickens that it is considered "normal." It also persists in the environment for a very long time, and since it is already all over my yard and none of my chickens are showing any signs I chose not to deworm them for coccidia. My new chickens however have two types of worms that are not normal and can definitely affect weight gain, body condition, and egg production (when they get old enough to lay). They are in quarantine in the garage on a concrete floor, so the environment will be easy to clean and they have not yet passed these parasites to my already established flock. And whipworms can be passed to my dogs when they eat chicken poop. So I am deworming them.
As for how to worm them, that depends on what medications you have easy access to, what you are trying to treat (there is no single dewormer that will take care of all worms), and how many chickens you have to treat. Someone with a large flock is more likely to use a medication that can be mixed with the drinking water or food. The downside is that you then have no real way of knowing how much each chicken got. And sometimes chickens will refuse to drink medicated water, which not only means they aren't getting any medication but also puts them at risk for dehydration, which can be deadly. Someone with only a few chickens will be better able to medicate each bird individually using a liquid medication and a syringe. This method ensures that each chicken is getting the correct dose, which means you can use less medication than you would if adding to food or water. But if you have more than just a few birds it can be very time consuming. Plus you have to catch the birds to medicate them which may or may not be stressful for them depending on how accustomed they are to being handled.
The withdrawl time (the length of time before it is safe to eat the eggs or meat) depends on the medication you use. Some medications don't have any withdrawl time at all and it is fine to eat the eggs while you are medicating. Most have a withdrawl time between 2-4 weeks. It should say on the medication insert and/or packaging how long before you can eat the eggs.