This battle is fought in the Lamp Chamber, where Sora battles against both Jafar and Genie. Genie releases only minor attacks. If he manages to hit Sora, he releases a small amount of HP, MP, or Munny orbs at the same time, but use the time he apologizes to figure out where he is and so you can Dodge Roll out of the way or Guard.
Jafar, floats across the chamber just out of reach, is the far greater threat. He occasionally evokes an ice storm at the center of the chamber this can be avoid it by simply staying out of the way. His main attack is a continuous beam of electricity from his staff. Mainly all of his attacks are simply random and different blasts of magic from his staff. One can wait for Jafar to drift down for an assault. As a more direct approach, Sora can simply track him down on top of whatever raised area he's standing on and let loose with a flurry of combos from the Keyblade. Either way, just keep attacking until he turns into a small ball of white light and floats off.
Since he is invulnerable in this form, use this time to heal the party. Once Jafar returns to human form, the process starts all over again until he's beaten. The prize for winning this fight is an upgrade to Blizzara. After this, it would be wise to heal the party at the save point in the treasure room and head across the lamp chamber towards Jasmine and jump into the massive pit.
Kingdom Hearts II
Upon entering the Sandswept Ruins, Jafar's Shadow will appear, and Sora must chase him on the Carpet. Once Sora reaches him, he will summon a swarm of Heartless and fly away—simply defeat the Heartless and catch up to Jafar's Shadow again. Whenever it starts to cast Thunder, simply attack it with the Keyblade to cause it to stop and flee again. Jafar's Shadow will repeat this attack a few times, then it will open up a new part of the area which contains a tower.
Chase the shadow to the top of the tower and defeat a final wave of Heartless, and a monument will appear at the top of the tower. Examining it will cause it to display images of three magic switches around the area. Now locate and trigger the switches using the spell of the same color, and the door to the Ruined Chamber will open for a short period. Sora must enter the chamber before time runs out to end the battle.
Kingdom Hearts coded
Jafar is fought twice in this game; once after finding Jasmine and then again after reaching the Lamp Chamber in the Cave of Wonders.