How faithful is the film "The Martian" to the book?
Were there modifications for length or videographic reasons, or any more significant plot detail changes?
Having read the book and seen the film, I can say that it's quite a faithful adaptation. The main differences I noticed are:
The novel starts after Watney has been abandoned, and does not explain exactly how and why he was left on Mars until over 100 pages into the novel. The film, on the other hand, starts off almost immediately with the dust storm that forces the evacuation.
Venkat Kapoor is named "Vincent Kapoor" in the film.
The book has more concerning the deal with the Chinese space program. (It is less well-received in the novel than in the film.)
The relationship between Beck and Johannsen is known to the Hermes crew in the novel (Lewis knows and reveals it to everyone), but it is kept secret in the film.
The journey from the HAB to the MAV is not shown in the film, but described in great detail in the novel (and there is a setback along the way involving a crater).
The space rescue is much more dramatic in the film (e.g. Watney pokes a hole into his suit to use the escaping oxygen as thrust).
The (latest eBook / audio book version of the) novel ends immediately after the rescue, but the film shows Watney teaching cadets and also reveals some of what the other members of the crew are doing with their lives, post-rescue.
Generally speaking, the novel devotes more time and energy to explaining the science behind Watney's actions and innovations.
Director Ridley Scott hasn't commented directly on whether the changes were for length or dramatic / videographic reasons. One can imagine that the motivations were a bit of both:
Cutting down on the scientific explanations helps with length — i.e. trying to squeeze a nearly 400-page book into 140 minutes — and with making the film appeal to a broad audience (not everyone wants to hear scientific details, unfortunately). Cutting down on the negotiations with the Chinese space agency and on Watney's journey from the HAB to the MAV also help with the length.
Watney's "Iron Man" stunt during the rescue (i.e. using his suit's oxygen supply as thrust) makes for good drama.
You may find interesting this article on the general differences in tone between the novel and the film:
Finally, Scott has been very recently challenged on why he decided to change the races of two characters (see second and third spoiler tags above), but he has not yet commented on this officially.
A few additional changes the movie made to the book:
In the book and movie, there is are two humorously juxtaposed conversations where Kapoor wonders what Mark is thinking and Mark is saying something silly to the computer. In the book, that is "Why can Aquaman talk to whales?" and in the movie it was another comment about Lewis's disco.
In the book when the HAB deflates, it takes Mark a extended period of time to move the (sealed) airlock nearer to the HAB and repair his suit. For instance, this requires starting a fire to locate an air leak, cutting an arm off his suit for repair material, and throwing himself against a wall. In the movie, he duct tapes his visor and walks out. This seems to have been cut to decrease run time.
In the book, there is are scenes which indicate that Johannsen will cannabilize the rest of the crew should the Hermes resupply fails.
Prior to the journey from the HAB to the MAV in the book, Watney loses contact with NASA when a short with his drill discharged through the probe communication system. This means in the movie he modifies the rover via NASA's instructions while in the book he is forced to figure out how to do this himself.
His vehicle in the book to got to the MAV is alot different from that used in the movie (see above). For instance, in the book the two rovers are hooked in series such that the front acts as a cockpit while the back one contains life support. There are no additional trailers. He doesn't bring pathfinder for obvious reasons. This is clearly how NASA instended to construct it in the book too. In the movie, he somehow constructs a train with several carts being pulled behind one rover. There is no indication where he could have gotten so many wheels or the required horsepower for this.
The journey from the HAB to the MAV is not shown in the film, but described in great detail in the novel. In it there are setbacks where he has to divert his path due to a duststorm and where his rovers overturn and he has to find a way to flip them back over.
In the ending of the book, Johanssen figures out how to ignite the bomb via a lighting panel while in the movie this is done by Vogel.
In the ending of the book, Dr. Beck (EVA specialist) performs the tether EVA to bring Mark into the Hermes and Vogel manually pulls him in via the tether. In the movie, Commander Lewis does the EVA and Beck triggers a motorized system to pull the tether in.
In general, the book feels more like a story about how Mark Watney managed to survive being stranded on Mars. As the movie cut most his problems and almost all of his solutions, it feels more of a story about how Watney was rescued from Mars. Both book and movie tells both of these but this is a matter of emphasis.
One major difference is the scenery. In the movie, everything happens in canyons between gorgeous, soaring cliffs.
Which is really pretty to look at, but completely unrealistic - NASA would never put a landing site so close to such features - too much risk to bump into them during the landing.
Accordingly, the books describes both Acidalia Planitia (Ares 3) and the inside of Schiaparelli crater (Ares 4) as pretty damn flat (which they actually are in reality). This plays some role in Watney's journey to the Ares 4 site, since he knows he'll make good distance on Acidalia Planitia, but has to worry about crossing the much more rugged Arabia Terra later on. This whole 3200km journey is rather glossed over in the movie, but it's a really big thing in the book and involves two major dramatic setbacks, a dust storm and the rover flipping over. This is probably the biggest difference in terms of the story timeline.
But I'm not complaining - a book doesn't need impressive scenery, but I can appreciate it in the movie even if it's not realistic.
Just to add to the other responses here, there is a dramatic character shift for one of the characters.
In the novel Melissa Lewis, the commander, is portrayed as strong, calm and collected, she trusts her crewmembers and commands them to use their expertise to do the jobs they are trained to do, essentially a perfect leader. In the movie, particularly in the final dramatic rescue scene, she is portrayed as an almost hysterical person who abandon's her post and demands to do the final rescue even though she isn't trained properly to do the rescue EVA. (This action is like a scared passenger grabbing the controls away from the pilot and would result in a court martial in the real world.)