That would be your powersupply, and yes there is a fan in there.

If that is going out, you will need to just replace the powersupply.

That will run you anywhere from $30-150 depending on what quality you want to get, and how powerful it needs to be to run your system.

On the side of the powersupply, and hopefully the side that is easily visable by you, it should have a label on it. If you can find out how man watts that powersupply is, I can find you some links to some quality replacements for it.

If/When the powersupply goes out, depending on the quality, it will either stop working because it detects the fan is dead, or it will keep running and you will run the risk of overheating and possible powersurges when something inside does fail to heat, so its in your best interest to replace the powersupply, if the noise is indeed coming from there.

As far as how long you would have until it needed to be replaced, its a crap shoot to be honest, it could not go out until you get a new computer, or it could go out five seconds from now, so whenever you get a chance I would replace it.