This quote from Macbeth is a type of figurative language called a metaphor. A metaphor is often defined as a comparison of two unlike things without the use of connective word (as connective word, such as "like" creates a simile).
In this case, the abstract quality of courage is being compared to something that could be manipulated in such a way to make it "hold fast" or "stay in place." In other words, something that exists in the physical world, a tangible thing. Think of courage as a block of wood that can be screwed or nailed to a wall so that it will stay where it is needed.
Shakespeare created this metaphor to show that Macbeth is wavering a bit in his resolve to kill Duncan. His wife, Lady Macbeth, who is more resolute, utters the line to motivate Macbeth. Today it would be like a wife telling her husband to quit whining, show some guts, and get the job done.