How do I know if my pain is appendicitis or right ovary?

You don't. You don't on your own , any acute right lower abdominal pain requires immediate professional help , your doctor after examination by tests like sonogram ct scan will find what is causing the pain.
Exam, testing. Differentiating the two requires a thorough history and physical exam, lab work, and diagnostic studies such as ultrasound and/or ct scan. See your gyn and get evaluated.