There is probably no way to stop the CPU fan from software, especially if you use an old computer. If you really want to stop the fan, you should probably just open the computer and detach the cable connecting the fan to the motherboard. At next reboot your BIOS may complain that the fan is not working (it does so in order to protect the CPU from overheating), but in this case you can probably disable the check.
Of course, as other have already said, this expose your CPU to permanent damage. I do not know how much old is your computer, but probably the last consumer CPUs that could be safely used with just a passive heat sink were Intel Pentium, maybe Pentium 2, and AMDs of the same epoch, which is now really old. If you really want to run your CPU without fan, I suggest you to check that the heat sink is clean (without dust on it) and the thermal conducting paste is properly applied between the CPU and the heat sink.
Even more, though, I suggest you to just buy another fan. They are really cheap and silent nowadays.