Holmes uses a "brain attic," goes by himself to think, and uses a pipe to focus.
Sherlock Holmes is very good at focusing. He has some techniques that he has developed over the years. One such technique is to clear his mind of useless facts. Watson is very surprised to realize that Holmes does not seem to know even basic information, for example, about the solar system, until Holmes tells him he has cleared it out of his head to make way for the more important stuff.
"I consider that a man's brain originally is like a little empty attic, and you have to stock it with such furniture as you choose. A fool takes in all the lumber of every sort that he comes across, so that the knowledge which might be useful to him gets crowded out…” (“A Study in Scarlet”)
When Holmes needs to concentrate and find the information he needs, he can just go into his attic and get it. The useless stuff is not there crowding it out. The rest of us don’t know any better, so we let information about the solar system in there. Silly us. Then we don't have room for new information and can't find it when we need it!
Another way Holmes focuses is by doing nothing. Sometimes he just sits and thinks. Of course, he is not actually doing nothing. His brain is at work. He appears to be doing nothing, when he is really ready to spring.
Our visitor glanced with some apparent surprise at the languid, lounging figure of the man who had been no doubt depicted to him as the most incisive reasoner and most energetic agent in Europe. Holmes slowly reopened his eyes and looked impatiently at his gigantic client. (“A Scandal in Bohemia”)
Holmes has a big brain, and he has to have time to exercise that brain. Sometimes he has to sit and think. While to the untrained observer he may seem to be sitting, he is really working on a problem. Holmes spends an inordinate amount of time doing this, especially when first getting a case and right before solving it.
Finally, Holmes likes to smoke his pipe to think about a problem.
“It is quite a three pipe problem, and I beg that you won't speak to me for fifty minutes.” He curled himself up in his chair, with his thin knees drawn up to his hawk-like nose, and there he sat with his eyes closed and his black clay pipe thrusting out like the bill of some strange bird. (“The Red-Headed League”)
While we would not advocate smoking these days, Holmes likes to do it to relax himself and to think. In the example above, he means that he needs to think about this particular problem for a long time.
A great detective has to be a great thinker. One of the reasons Holmes is so much better than the rest of us at solving mysteries is that he knows how to develop laser-sharp focus. I am not suggesting you go out and get a pipe, but you may want to clear your mind attic of some useless facts!