A calcium–phosphate system was obtained by sol–gel method from 0.4 M solutions based on ethyl alcohol, tetraethoxysilane, phosphoric acid, calcium nitrate, and magnesium nitrate, sodium chloride. Compositions with different contents of CaO, Na
2
O, and MgO were prepared. After maturation of the solutions, heat treatments were applied at 60 °C for 30 min; and followed by 600 °C and 800 °C for 1 h. Solution with 20 wt% MgO was found suitable for film production. The physicochemical processes of the formation of materials were studied, including the main stages: removal of physically bound and chemically bound water, combustion of alcohol and the products of thermo-oxidative destruction of ethoxy groups, and crystallization processes. The phase composition and structure of the films obtained were established at 600 °C and above when crystalline forms of SiO
2
, CaSiO
3
, Ca
2
P
2
O
7
, and complex phosphates were fixed. In the system with the addition of magnesium ions, β-cristobalite SiO
2
and stenfieldt Mg
3
Ca
3
(PO
4
)
4
were detected; however, a crystalline sample could only be obtained at 800 °C. In the system with sodium ions, chemical compounds Ca
5
(PO
4
)
3
Cl, NaCl, and SiO
2
were determined. A uniform film coating was formed on the surface of the substrate. The introduction of sodium oxide into the SiO
2
–P
2
O
5
–CaO system increased the bioactivity of the materials obtained.