servo and pir

how do you get a pir to communicate with a servo to tell it when to turn on and off

The PIR is a switch which is either ON of OFF (or HIGH/LOW).
Your sketch has to detect the HIGH or LOW and either run or stop the servo.

if (digitalRead(pirPin) {
  // Pin reads HIGH
  myServo.write (180);
} else {
  // Pin reads low
  myServo.write (0);

or more tersely (and probably less flexibly)

  myServo.write (180 * digitalRead (pirPin));