Detective Mode is built into the cowl of the batsuit, giving Batman an edge in terms of investigations and as a means of taking on various criminals he faces throughout Gotham City. It can be activated at will and acts in a similar way to Superman's power of x-ray vision due to the fact that he can see either a blue or orange silhouette of friends and foes he comes across through walls at short ranges. Blue usually depicts unarmed people and thugs, usually those who are armed with melee weapons such as knives, caddle prods, etc. Orange silhouettes depict anyone armed with firearms and mines.
As a detective, Batman utilizes this device as a means of investigating crime scenes via the use of the mode's evidence scanner. It gives him a way of detecting evidence that could be overlooked by a standard police investigation and with the evidence gathered, can reconstruct a crime scene piece by piece with each bit of evidence he finds. Evidence includes finger and footprints, shell casings, bits of clothing, etc as well as how long ago a certain event occurred via oxidization. Reconstructing a crime scene utilizes advanced holographic silhouettes of people either living or recently deceased placed at the scene before they leave or died. He can also replay the reconstruction to look for further evidence.
The device is known to also have long distance connection with the Batcomputer as a means of identifying victims and criminals. It gives him access to the missing person's database, as well as criminal records and even information on various possible weapons used at the scene. He can also send collected evidence to the batcomputer which Alfred Pennyworth can send to the police.
Against various criminals, Batman's Detective Mode seems virtually flawless however in later games, criminals are able to counter it. The Penguin utilized military grade jammers to interfere with the use of Detective Mode and therefore rendered it useless unless Batman was able to take down the thug issued the jammer and destroying the device. The Arkham Knight had the use of jammers as well due to his knowledge on Batman and his various gadgets. The Knight also had soldiers issued uniforms capable of rendering them undetectable by means of Detective Mode, so Batman couldn't get any indication of armaments carried or the vitals of the wearer.