That's an iMac G5 (PowerPC, not Intel).
But your friend must have some CD/DVDs, that he might have given you.
They look like this, but have written iMac instead of MacBook on it.
Without those, you might be helpless. You could buy some Mac OS X (Panther 10.3, Tiger 10.4, Leopard 10.5) Install DVDs on eBay or an Apple authorized reseller, if you can't find them.
Or maybe you know someone, who could have a Mac OS X retail DVD, as Restore DVDs from other Mac models won't work.
Or have you got access to another Mac?
If so you could boot your Mac in Target Disk Mode (TDM - press and hold "T" immediately after the start up chime sounds, until the following symbol appears:
Then connect both Macs via FireWire and start the other, functioning Mac normally. Your iMac will show up as an external drive. Then use Disk Utility to Verify and Repair the iMac's Disk and see if there are problems.
The Firewire 400 port on the iMac. The port will look the same on the other Mac.