As a user of Altera FPGA, it is very likely that you have shorted gate(s) within your faulty device.
A replacement FPGA is generally a blank device containing hundreds/thousands of configurable gates that will not do anything until it has been pre-loaded with a configure file for a specific application. There are several types. Most newer chips do have memory blocks that retain the configuration file.
In my case, the replacement chip from manufacturer is completely blank. It must be loaded with the file. Technically you can do it outside the circuit but it is impractical due to the huge number of pins. Therefore it is programmed in circuit.
Once loaded it is like a flash that remembers the configuration and your newly configured circuit city is ready for use.
As far as programming the FPGA, it is a bit involved; First you must have a good copy of the file. Use the JTAG pins for accessing the chip. Utilize the vendor's own software that is usually free at their site. You may have to buy/make some sort of an interface for JTAG connections. Also, depending on application, it may have to be in a specific mode.
I my case, JTAG interface or the software configuration was not a problem. The biggest issue was not having a copy of the file which the vendor would not provide before a disclosure statement which literally took months. Even though it is used in a rather expensive equipment,(+$20k) I later found out that it was not copy protected after all. (copying such specifics are useless in non competitor world)
Of course, if available, you can always try reading the file from a working unit in circuit. It may or may not be copy protected depending on the application it is used on.