The nature and origin of turbulence and magnetic fields in the intergalactic space are important problems that are yet to be understood. We propose a scenario in which turbulent flow motions are induced via the cascade of the vorticity generated at cosmological shocks during the formation of the large scale structure. The turbulence in turn amplifies weak seed magnetic fields of any origin. Supercomputer simulations show that the turbulence is subsonic inside clusters/groups of galaxies, whereas it is transonic or mildly supersonic in filaments. Based on a turbulence dynamo model, we then estimate that the average magnetic field strength would be a few microgauss inside clusters/groups, approximately 0.1 microgauss around clusters/groups, and approximately 10 nanogauss in filaments. Our model presents a physical mechanism that transfers the gravitation energy to the turbulence and magnetic field energies in the large scale structure of the universe.