The surrounding environment often acts in a destructive way on materials we apply in our everyday life. The best way to protect them against such activity is to cover the basic materials with coatings possessing different properties, tailored to their applications. Anticorrosive layers are one of the biggest groups of such protective coatings, especially those containing silica or its derivatives. Depending on a type of silica precursor and a method of deposition, one can obtain coatings of different structures and properties. In this work, three different silica precursors were applied: TEOS (tetraethylorthosilane), DDS (dimethyldiethoxysilane) and AerosilTM (the powder silica). Sols of different concentrations of the aforementioned precursors as well as commercially available preparations (Sarsil H1 4/2 and SILOXAN W290) were applied for thin films deposition by a dip coating or an infiltration method. The substrates could be divided in two groups: metallic (steel and titanium or titanium alloys) and porous (represented by old brick, sandstone and limestone). Following the deposition process, the layers on metallic substrates were additionally annealed at 500 °C to improve their adhesion and mechanical properties, while those on porous materials were dried in air. All prepared coatings were primarily studied by FTIR spectroscopy and X-ray diffraction. The morphology of their surfaces was imaged by SEM and AFM microscopies, which also allowed determination of the roughness of obtained materials. The measurements of wetting angle values enabled to find the relationship between the surface topography, the type of silica precursor and the hydrophobic/hydrophilic properties of the samples. The results confirmed the hydrophobic properties of coatings obtained by the infiltration technique on the porous materials and the high hydrophilicity of the annealed thin film deposited on the metallic substrates.