When using a primer to replicate DNA in a plasmid, does it replicate the whole plasmid?
PCR produces linear DNA, not circular. You can replicate whole plasmids using PCR, but the DNA will still be linear, as if you cut the plasmid with a blunt-end restriction enzyme.

So why doesn't the whole plasmid get copied when using PCR? Let's assume the primers are designed to bind 1000 bases apart from each other. The first round of PCR will probably produce longer pieces of DNA, because the oligos can only bind to the plasmid and the Polymerase can keep going. But the polymerase will fall off at some point, either randomly or when the temperature is pushed up for the next round of PCR. But in round 2, there should be equal numbers of circular plasmid and linear copy. The proportion of linear copy will increase every round. As the linear copies increase, the oligos are more and more likely to bind to linear copies than to circular plasmid.

Binding to linear copies is why the PCR product size is controlled. Let's assume that a linear copy is 1500 bases, because the polymerase ran an extra 500 bases past the other oligo site on the plasmid. But when the reverse oligo binds that site on the linear copy, the polymerase will run 1000 bases and fall off the end of the linear copy. This new copy will have the forward and reverse oligo sites at the ends, so it's the right size. Any copies produced from this strand will also be the right size. As the reaction proceeds, the proportion of correct-sized strands increases, and create more correct-sized strands.