YouTube offers full-length movies that users are able to rent or buy for a fee and some that are completely free to watch. The movies that have a fee attached to them are totally legal to watch and have been approved by the right distributors.
On the other hand, the movies that are free tend to be DVD or Blu-ray rips and, therefore, they may not be on the website through entirely legal means. That does not mean that all the free movies are uploaded illegally. Some distributors and film companies are offering the movies free of charge for a variety of reasons.