What is the primer used for DNA replication?
A primer is needed to start replication of the lagging strand.
In the diagram above, you can see that the leading strand is replicated by the DNA polymerase in a 3'-5' direction. This allows the enzyme to travel along the leading strand right behind the helicase. In fact, DNA polymerase can only travel in a 3'-5' direction.
Subsequently, the lagging strand can't be replicated in a unidirectional manner (i.e. following right behind the helicase). This means that the DNA polymerase must replicate in the opposite direction (i.e. 3'-5' because the strands have opposite directions). The DNA polymerase could technically wait for the lagging strand to be completely separated from the leading strand and then commence replication from the 3' end of the lagging strand. This, however, would be very inefficient and time-consuming.
To solve this problem, primers are used, allowing the DNA polymerase to attach even in the middle of the lagging strand. The area replicated between two primers is called an Okazaki fragment.
Hope this helped!