During DNA replication, RNA primer starts the new strand formation.Primer is a short RNA segment.
Primer is formed because the DNA polymerase can only extend an existing strand and cant start a new strand.
Because a new strand cant be formed by the DNA polymerase, a small RNA is formed which is extended by the DNA polymerase as DNA.
So RNA primer is starting the new DNA strand.That is the function of the RNA primer.
DNA primer is not there because DNA cant be formed from the beginning. DNA strand can only be extended from RNA primer.
After the replication , the primers are removed and new short DNA segment is formed in its place.