At first he will shoot fire balls at you. Keep moving left and right, and closer to him. Once you get close enough he will stop and try to hit you with his stick. Take a few steps back and let him try to hit you. Move, and when he stops, hit him. Do this repeatedly until he eventually kneels down. Then, hit him as many times as possible. He will not fight back. When he gets up, repeat the same process until there is a short intermission sequence. He will then use attacks such as curling up in a ball and swinging his bat in a figure eight style on both sides. Wait until he is done and hit him afterwards. In a short time you will defeat him.
This is the machine you must fight in order to find Katara. Dodge the fire bending. Try running left to right, then right to left. Continue this until you see a flashing light near it. This is your chance to attack. Hit it with Aang. You may use a Chi attack but just a plain attack should work just as well, however it takes time. You will have Saka (Katara's brother) fighting with you to do double damage. After about a quarter way down on HP, the machine will start throwing fire around. Keep a safe distance from this attack. It causes no real threat to your or your partner as long as you stay as far away as possible.