outsider:
There is more than one kind of Arduino, which one do you have? You cannot drive a motor directly from an output pin,not enough current, is that what your are doing? How much current does the motor require? Is the PIR input HIGH or LOW when activated?
I am using the mega 2560. the motor requires 3-6 V.
once plugged in, the code calculates the value of the pir input using digitalRead then goes on to a while loop