Can I still change the battery of a really old iPhone?

It's a really old iPhon. I think it's the iPhone 2 but I'm not completely sure. When I put it to charge, the apple logo will show up faintly and be like that for hours. Can I get a new battery? How much will it cost?

The battery of an iPhone is controlled by charging it with a power cord, it's not something you can manually take out and replace like in a laptop. Even if the battery was able to get restored, the phone would be practically useless because the software is very outdated and the new software versions are not supported in that iPhone. I suggest saving up for a new phone.

There was no "iPhone 2" for the record.

The 2nd iPhone was called the iPhone 3G.

Either way you'd need of course to properly ID the iPhone you are referring to to be able to source a battery for it.