Nucleotide analog inhibitors, including broad-spectrum remdesivir and favipiravir, have shown promise in in vitro assays and some clinical studies for COVID-19 treatment, this despite an incomplete mechanistic understanding of the viral RNA-dependent RNA polymerase nsp12 drug interactions. Here, we examine the molecular basis of SARS-CoV-2 RNA replication by determining the cryo-EM structures of the stalled pre- and post- translocated polymerase complexes. Compared with the apo complex, the structures show notable structural rearrangements happening to nsp12 and its co-factors nsp7 and nsp8 to accommodate the nucleic acid, whereas there are highly conserved residues in nsp12, positioning the template and primer for an in-line attack on the incoming nucleotide. Furthermore, we investigate the inhibition mechanism of the triphosphate metabolite of remdesivir through structural and kinetic analyses. A transition model from the nsp7-nsp8 hexadecameric primase complex to the nsp12-nsp7-nsp8 polymerase complex is also proposed to provide clues for the understanding of the coronavirus transcription and replication machinery.