The revolution in XX century physics, induced by relativity theories, had its roots within the electromagnetic conception of Nature. It was developed through a tradition related to Brunian and Leibnizian physics, to the German Naturphilosophie and English XIXth physics. The electromagnetic conception of Nature was in some way realized by the relativistic dynamics of Poincaré of 1905. Einstein, on the contrary, after some years, linked relativistic dynamics to a semi-mechanist conception of Nature. He developed general relativity theory on the same ground, but Hilbert formulated it starting from the electromagnetic conception of Nature. Here, a comparison between these two conceptions is proposed in order to understand the conceptual foundations of special relativity within the context of the changing world views. The whole history of physics as well as history of science can be considered as a conflict among different worldviews. Every theory, as well as every different formulation of a theory implies a different worldview: a particular image of Nature implies a particular image of God (atheism too has a particular image of God) as well as of mankind and of their relationship. Thus, it is very relevant for scientific education to point out which image of Nature belongs to a particular formulation of a theory, which image comes to dominate and for which ideological reason.