Sprint 0 is not a part of the official Scrum Guide. It has arisen as an unnoficial approach to kickstarting Scrum in some organisations.
All that is needed to start Scrum is a development team, a Scrum Master, a Product Owner and a backlog that covers at least 1 sprints worth of work. So some might regard 'sprint 0' as the formation of the team and the refinement of a backlog that covers at least one sprints worth of stories.
With this rapid starting approach the team would need to do things like environment setup and design/architecture within the first sprint. The development team will often then make it clear to the Product Owner that not a lot of business value will be delivered in the first sprint.
The alternative is to have a longer sprint 0 that packs in a lot of setup and preparation work. The danger with this approach is that it can be a bit waterfall. With the sprint 0 replacing the project inception/design phases of waterfall projects.
I'm not a big fan of sprint 0, but I have seen them used a lot. To answer your original question some things that crop up in sprint 0 are:
- Setting up build/continuous integration/source control
- Deciding on a testing approach
- Configuring release automation
- Setting up electronic task tracking tools (like JIRA/TFS/etc.)
- Agreeing on high level architecture
- Agreeing the team's definition of done