Philosophers apply analogies and metaphors to make an argument, to clarify, to propose and to make a point; Scientists too.
During 17th century, Leibniz uses the analogy of the 2 clocks to suggest that mind and body only appear to interact: in reality there is no relation between the 2 substances, rather God has pre-established a harmony so that our minds and bodies do not fall out of sync (Parallelism).
In psychoanalysis, Freud used an analogy based on the laws of thermodynamics. These laws indicated that energy neither can be gained nor destroyed in a system, though it can be transformed from one type to another. By analogy, Freud considered that psychic energy should follow the same rules as physical energy.
Hilary Putnam proposed the "Computational Theory of Mind", a view that the human mind and/or human brain is an information processing system and that thinking is a form of computing. Despite being largely repudiated in analytic philosophy(due to work by Putnam himself, John Searle, and others), the view is common in modern cognitive psychology and is presumed by many theorists of evolutionary psychology.
Philip Lieberman, in his book "Human Language and Our Reptilian Brain" notes that mechanical-biological analogies are not limited to neuro-physiology. He explains,
"Physicians bled feverish patients in the early 19th century because of a false analogy between blood temperature and steam engines. Early steam engines frequently exploded as pressure increased at high operating temperatures. Safety valves then were invented that released super-heated pressure. Hence, it followed that bleeding would reduce temperature. As a result of this false analogy, the chances of survival of soldiers wounded were greater if they hadn't been treated by surgeons immediately after the battle. In its own way the analogy between biological brains and digital computers is as fatal for understanding neural bases of human language."