HEAT-FS and ATGM functionality in-game

How do HEAT-FS shells and ATGMs work in-game? What determines their penetration values and post-penetration effect? What makes certain ATGMs and HEAT shells better than others?

And if anyone knows, what in the files determines the damage and such? I don’t really know how to read anything in the files but would like to know how so I don’t have to go making forum posts.