In the past, these orders were called restraining orders. Not everyone can obtain a protective order. The petitioner must be a victim of domestic or family violence, harassment, stalking or a sex offense.
The forms are available here.
Carefully read the instructions.