Usually when the fan runs at high speed it indicates a bad temperature sensor. If a battery is not installed or the battery is bad, then the sensor in the battery may not be registering properly.
See if you can run the Apple Hardware Test. If you don't have the original DVDs which shipped with the laptop, then see if you can get a copy of the AHT from here:
https://github.com/upekkha/AppleHardwareTest
Usually there is an Apple ReadMe file (.pdf) inside the .dmg archive with instructions for creating a bootable external drive (may need to be a Firewire drive for a PPC Mac) or you may need to burn the AHT to a CD.