Use a black stick to pry out the battery from the battery socket on the logic board.
iMac (24-inch Mid 2007) Take Apart — Battery 53