At this age, your daughter's behaviors are likely modeling something she has seen on TV. Typically, a child her age does not "play doctor" unless someone else has introduced that to her.
Tell her that her "private parts" are anything her swim suit covers, and that "private" means no one is to touch or look at those parts but her, Mommy and Daddy, and the doctor. Most importantly, tell her that she should let you know immediately if anyone touches or tried to touch her private parts. She also should learn that is inappropriate to look at or touch someone else's "private parts." If that happens, she should tell you right away.
It is not enough to have this talk with your daughter once. It should occur daily, then happen weekly or monthly as she gets older. The world is full of sexual predators and it is your responsibility to do everything you can as a parent to protect your child and teach her how to stay safe.