In this article, we investigate optically induced terahertz radiation in ferromagnetic FeCo layers of varying thickness on Si and SiO2substrates. Efforts have been made to account for the influence of the substrate on the parameters of the THz radiation generated by the ferromagnetic FeCo film. The study reveals that the thickness of the ferromagnetic layer and the material of the substrate significantly affect the generation efficiency and spectral characteristics of the THz radiation. Our results also emphasize the importance of accounting for the reflection and transmission coefficients of the THz radiation when analyzing the generation process. The observed radiation features correlate with the magneto-dipole mechanism, triggered by the ultrafast demagnetization of the ferromagnetic material. This research contributes to a better understanding of THz radiation generation mechanisms in ferromagnetic films and may be useful for the further development of THz technology applications in the field of spintronics and other related areas. A key discovery of our study is the identification of a nonmonotonic relationship between the radiation amplitude and pump intensity for thin films on semiconductor substrates. This finding is particularly significant considering that thin films are predominantly used in spintronic emitters due to the characteristic absorption of THz radiation in metals.