Jafar's lamp was a black oil lamp that appeared at the end of Aladdin. The lamp was created following Jafar's wish to become an all-powerful genie, not realizing such a wish would result in eternal imprisonment. The lamp serves as Jafar's prison and anchor and should it be destroyed, so too will Jafar.
At the end of the film Aladdin, the title character tricked Jafar into wishing he was an all-powerful genie. Aladdin, knowing the evil sorcerer would be sealed into a lamp for eternity to do a master's bidding, held up Jafar's black, would-be prison that appears once the wish is granted by Genie and it swallowed Jafar (while pulling Iago with him) inside the itty bitty space where they start fighting. Genie then sent the lamp far into the Cave of Wonders for 10,000 years.
In the sequel, Iago somehow managed to escape the Cave of Wonders then escape the lamp, but instead of releasing Jafar from it, he threw it down a nearby well, due to Iago having grown irritated that Jafar doesn't grant him credit when it's due, and instead used him (with Jafar also making the grave mistake of reminding Iago shouting "Polly Want a Cracker" that finalized Iago's decision).
Later, Abis Mal finds the lamp at the well and rubbed it, releasing Jafar. At the end of the film, Aladdin and his friends tried to capture Jafar's lamp so they could destroy it, which would thus destroy Jafar. In the end, a wounded Iago, having fully turned against Jafar, kicked the lamp into a lava pit and it melted away, causing Jafar to electrocute, then implode into nothingness, destroying him forever.