Bassanio a gentleman of Venice requires 3000 ducats to pay for his travel expenses to Belmont. Bassanio wishes the money as he is seeking to wed the Heiress Portia. Bassanio turns to his good friend Antonio, who is a wealthy merchant.
Unfortunately, Antonio's money is tied up on Ships doing business. He, however has offered to be Guarantor, they attempt to borrow money from a wealthy Jew, Shylock. Shylock reluctantly agrees, but on the condition that if he doesn't pay the 3000 Ducats by three months than, Antonio has to give up a pound of his flesh, closest to the heart. They agree to the Bond.
Portia, in her home at Belmont has been visited by many suitors. From her dead fathers wishes her suitors were required to choose between a lead, silver, or a gold casket. The one who chooses the casket containing her portrait, would be her husband. No man has yet chosen the correct casket. 
Jessica, the daughter of Shylock wishes to change into Christianity, against her father's will and marry the Christian Lorenzo. She runs away with him, and takes some of her father's fortune. Shylock is furious and vows revenge. 
Bassanio with friend Gratiano travel to Belmont to, Portia is delighted to hear this, as he is the one she wants to marry. Before hand the prince of Morocco and the prince of Aragon had tried but failed to choose the correct casket. Bassanio takes his time in choosing the casket - he chooses the lead casket; the correct one. Gratiano, woes Nerissa, and the four prepare to be wed.
Bassanio's friends arrive with a messenger, he receives a letter from Venice, it said that Antonio's ship had not yet arrived and Shylock was demanding his pound of flesh, as the money had not been paid. Bassanio is extremely upset about this news. Portia reassures him and offers to pay any amount possible or do anything she can. The men set off back to Venice.
Portia along with Nerrissa conduct a plan to help Antonio, they tell Lorenzo and Jessica to mind the house while they wait for their husbands in a monastery. They plan to dress up as Lawyers in order to defend Antonio in court.
The two women enter the courtroom with a message that the doctor Balthasar (Portia) has being sent to replace the original doctor, Bellario. Portia begins her case with a plea for mercy, she begs him to forfeit the bond and accept three times the amount. Shylock refuses, as he wants to take his revenge on the Christains who have criticized him because he is a Jew.
Portia then reads the bond and discovers that Shylock is only allowed to take one pound of Antonio's flesh. She tells him that he can take his pound of flesh on the condition that he takes exactly one pound of flesh and only flesh. No blood shall be shed. Shylock is forced to forfeit the bond, if he does go outside the conditions than he too will be punished. Since he forfeited the bond, but threatened the life on a Venetian, Shylock was forced to give up his money, half to Antonio the other half to the general state. Antonio takes pity on the Jew and declines his half of the money, he tells the court that Shylock can keep his money, but on the condition that he change into Christianity and leave his money to his daughter on his death. The Jew painfully agrees. 
The men gratefully thank doctor Balthasar and her clerk, they offer them anything they desire. Portia and Nerissa both ask for Bassanio's and gratiano's rings. Reluctantly they hand it to them, as it was a present from their wives who told them never to lose it. 
Portia and Nerissa return home, soon after Bassanio, Antonio, and Gratiano return with the good news. Portia and Nerrissa demand to know what happened to the rings, the men apologized and explained the situation. Portia and Nerissa show them the rings and explain that they were the two doctors.

this is the explanation

Shylock nevertheless agrees to make the short-term loan, but, in a moment of dark humour, he makes a condition - the loan must be repaid in three months or Shylock will exact a pound of flesh from Antonio. Antonio agrees, confident that his ships will return in time.Because of the terms of Portia’s father’s will, all suitors must choose from among three caskets, one of which contains a portrait of her. If he chooses that he may marry Portia, but if doesn’t he must vow never to marry or court another woman. The Princes of Morocco and Arragon fail the test and are rejected. As Bassanio prepares to travel to Belmont for the test, his friend Lorenzo elopes with Shylock’s daughter, Jessica. Bassanio chooses the lead casket, which contains her picture, and Portia happily agrees to marry him immediately.Meanwhile, two of Antonio’s ships have been wrecked and Antonio’s creditors are pressurising him for repayment. Word comes to Bassanio about Antonio’s predicament, and he hurries back to Venice, leaving Portia behind. Portia follows him, accompanied by her maid, Nerissa. They are disguised as a male lawyer and his clerk. When Bassanio arrives the date for the repayment to Shylock has passed and Shylock is demanding his pound of flesh. Even when Bassanio offers much more than the amount in repayment, Shylock, now infuriated by the loss of his daughter, is intent on seeking revenge on the Christians. The Duke refuses to intervene.Portia arrives in her disguise to defend Antonio. Given the authority of judgment by the Duke, Portia decides that Shylock can have the pound of flesh as long as he doesn’t draw blood, as it is against the law to shed a Christian’s blood. Since it is obvious that to draw a pound of flesh would kill Antonio, Shylock is denied his suit. Moreover, for conspiring to murder a Venetian citizen, Portia orders that he should forfeit all his wealth. Half is to go to Venice, and half to Antonio.Antonio gives his half back to Shylock on the condition that Shylock bequeath it to his disinherited daughter, Jessica. Shylock must also convert to Christianity. A broken Shylock accepts. News arrives that Antonio’s remaining ships have returned safely. With the exception of Shylock, all celebrate a happy ending to the affair.