Participants will need a valid passport (not just an ID) from their home country which allows them to travel to Sweden and to Brazil as a tourist. The Passport should be valid for 6 months beyond YIP (For YIP 10 this is: The passport should be valid to at least December 25, 2018)

For Sweden
Holders of EU, Swiss, Icelandic, Norwegian passports are fine and don’t need to do anything.

Holders of passports of US, Mexican, Brazilian, Argentinian, New Zealand, Australian, Japanese, South Korean and many other countries are fine as long as the so called 90/180 day rule is observed. Which means you can stay for 90 days in the Schengen area (most of Europe) and then you have to be out for 90 days. 
The YIP schedule is designed to comply with that rule. We are first 2,5 months in Sweden, then 2,5 months in Brazil, then 8 weeks on Internship and then 3 months in Sweden again. Watch to spend not to much time inside Europe before YIP starts.

Holders of passport of these countries need a tourist visa for Sweden, twice. 
You are yourself responsible, but you can consult YIP for help. 
Here is the general site by the Swedish Government about this. You will need beside a passport a valid health insurance and proof of enough money.

For Brasil
Holders of EU, Swiss, Icelandic, Norwegian passport are fine and don’t need to do anything

Holders of other passport should please check themselves
f.e. here. The visa requirements for Brazil are usually based on reciprocity meaning that Brasil treats the visitors the same as Brazilian Nationals are treated by the countries Brazilians visit. Applying for a visa for Brazil when needed can also be done while in Sweden.