Contractors, as the name implies, are hired for the time period of the contract. If both the contractor and the employer agree, the contract may be extended for longer terms; however the company can terminate the contract early without any penalty. Generally speaking, the same company can not simply let a permanent employee go unless they can prove it's the worker's fault (low performer, misconduct, etc.). If job security is a major concern then 'permanent' is better.
On the other hand, contractors are paid more but there is no benefit such as dental/health insurance; permanent workers are paid less but normally have some benefit package. A permanent worker may work on the same thing for decades and get bored, while a contractor can always have something new to enjoy