The poor man's lamb (Hebrew:כבשת הרש) is one of the best known Biblical allegories.
This allegory can be found in 2 Samuel 12 and it begins with G-d sending Nathan the prophet to speak to David about his sin ( Killing Uraih and taking his wife).
With wisdom, Nathan used a story to get the message through to David.
Nathan tells him that a rich man stole the only lamb a poor man had. The poor man had nothing else besides this lamb. In ancient times, it was common in those days to keep a lamb as a pet, and Nathan used this story of the pet lamb to speak to David.
The sin Nathan describes is theft. There is a sense in which David stole something from Uriah. The Bible says that in marriage a husband has authority over the body of his wife . David did not have this authority over the body of Bathsheba and he stole from Uriah. Adultery and sexual immorality are theft - taking something that does not belong to us.
Nathan did not ask David for a judicial decision, and David naturally assumed the story was true. David immediately passed sentence on the guilty man of Nathan's story.
David shows that we often try to get rid of our guilty conscience by passing judgment on someone else.
David’s sense of righteous indignation was so affected by his own guilt that he commanded a death sentence for the hypothetical case brought by Nathan, even though it wasn’t a capital crime.
David rightly knew that penalizing the rich man, wasn't enough. He also had to restore something to the man he took something from. David knew that true repentance means restitution.
The idea of this allegory is that the man should have had pity on his neighbor and did not. In the same way David should have had pity on Uriah and Bathsheba's father and grandfather.