.env file, as its name suggest, is a local where you put all your environment setup, such as database credentials, cache drivers and etc. Everything that is about the server that the project is running, and may have different values for different servers, are setup here.
Per example, your local dev environment has different database credentials than production environment. Also your colleague dev environment has different than yours. So each one has a .env with different informations.
And because of these, this file can't be versioned, so .env.example is the file that has every constants setups that .env has but with no values, and only this one is versioned. .env.example works as a guide for creating a .env file with the needed informations that is needs to have the application running.
As you are working with Laravel, you can find more informations here: environment-configuration