How do books become movies?

When a book is very famous and liked by a lot of people then a director will talk to the writer of the book and would ask for his permission and make a movie out of it.