you just compress the brake pads enough to clear it from the disc and disable the brakes, remove caliper and carrier, pop the dust cap off, undo the allen cinch screw, undo nut and remove hub, the front bearing will fall out on its own.
if you are buying a hub without the bearings in place or if its a used hub then remove the inner bearing and seal by hammering them out with a brass drift from the inside, You can also choose to tear out the seal and simply lift out the rear cone and then hammer out the cup. Hammer out the outer cup and install new in reverse.
Go to doodh wala, drink a lassi from him and when hes not looking snatch a 1 kg doodh ka plastic bag (or just ask for one, or buy one, or just find a clean bag)
put about 65 grams of grease in the bag - we will put the bearings in after you wash their storage oil from them. After they are clean dunk the bearings in there and knead the grease into the bearings, takes a minute, now take the inner bearing and install in hub, install seal and hammer with a piece of flat wood - make sure it goes in squarely, As expected with bearing service everything should be extra neat n clean and use clean gloves to handle bearings. Now remove the smaller bearing and keep it aside and scrape the bag on the edge of a table to move the grease into a corner of the bag, install the hub on spindle, cut the bag at the corner and squeeze the grease into the hub and then install the smaller bearing on the spindle and install the locknut (make sure to orient it correctly) Keep on rotating the hub as you spin the nut, now take a spanner (nigel) or a pair of adjustable pliers or water pump type and crank down the nut whilst rotating the hub, back it off about 5 or 6 times and keep on tightening (strong force aka insaanon wali - not gorilla). Between the retightening, smack the spindle nose with a hammer and wood piece to jar loose the bearings again.
Now comes the time to set the clearance. you have 2 options
1 - follow the exact and perfect mercedes benz technique and use a dial gauge with magnetic foot setup and adjust clearance to 0.04mm
OR
2 - old school it - meaning tighten with strength of finger and thumb and advance the nut till it stops under finger pressure (requires experience to set it this way - I have not fried a bearing set yet this way (Khuda ka shukr hai). - Anyone who has changed bearings on hiace, hilux, corolla 1968-1982, corona 1966-1983, cressidas of all ages can do this - the only catch is that mercedes uses fine threads on the spindle and rather than cotter pin to lock the nut in a fixed number of positions - mercedes use a allen screw to lock the nut at any position.
Be sure to use a GC-LB rated grease of NLGI-2 thickness, dont use NLGI-3 which is usually sold in Pakistan as it tunnels out and away from the bearings.
there is another technique which involves pulling the hub with a spring scales or tying a nut to a string and hanging it off a stud in the hub, this technique is described in the repair manuals of old mazda vehicles including RX7s - I dont recall the exact whole thing right now.