The slang term “the devil is in the details” has a number of different senses. All of the meanings for the term boil down to the fact that it is often the small details of something which make it difficult or challenging. These details can prolong a task, or foil an otherwise straightforward dealing. Like many proverbs which involve the devil, it is meant to sound a note of caution. It may also be used to excuse or explain the obfuscation of an otherwise very simple project or task.
In one sense, one might say “the devil's in the details” to refer to very small but ultimately important components of a larger task. For example, performing a scientific experiment in a laboratory is a hugely involved task which can sometimes be highly dangerous. A small error at the beginning can translate into a useless experiment at the end, so experimenters are reminded that the devil's in the details. This reminder is intended to encourage the scientists to check their work, and to be thorough and careful in the lab.
In some cases, this sense will be used to explain why a task took longer than expected. Someone might say that they had projected a shorter completion time, not realizing that the devil's in the details. People generally use the proverb as an excuse in this sense, when they are trying to defuse anger about a time delay. The implied argument is that not attending to these details might set the devil loose, ultimately causing more work.
Some people also say that the devil's in the details when they examine a contract or agreement. Generally, the agreement looks reasonable at first glance, but a closer examination of the terms and small print reveals a problem. People who routinely sign such agreements usually learn to look them over very carefully, looking for the snag or issue which might ultimately make the deal untenable. This attention to detail is the hallmark of lawyers and accountants in particular.
Looking out for the small details in life is generally a good practice, since it greatly reduces the risk of surprise. While some surprises are pleasant, those planned by the devil are generally not, so it pays to avoid pratfalls which are preventable by remembering that the devil's in the details. This behavior is also often rewarded by the world in general, as you will gain a reputation for being careful and thoughtful as well as difficult to fool.