As with most things, different doctors do things differently depending on where and how they were trained, experience (over time, doctors fall into a particular routine that might be slightly different from the textbook they learned from) and familiarity with the individual patient.
As a rule, they will say something along the lines of "Ok, hop off the table and drop (lower) your pants" and they will glove while I am doing that, then tell me to turn around and lean over the table.
My current PCP has me in a gown with my underwear on, so will usually say to stand while she gloves, has me lift the gown and has me drop the skivvies, followed by "Ok, now let's check your prostate" (or something similar.) and gloves while I am doing that.
The urologist will have me stand and may or may not pull the shorts down herself, do the genital, then, the DRE, both more thoroughly that the PCP. She will glove before.
In the rare event that I need a rectal without the genital (usually for cause ...something related to the digestive tract) they may have me simply lower my pants below the knee and roll over. They may glove while giving instructions or while I'm getting into position.