This may help.
Most team sports have a period of training to recover fitness levels, followed by exhibition games (commonly known as friendlies outside North America) prior to the start of their regular seasons ("pre-season training" and "pre-season" games). The game results do not count in the season standings of the teams, so they serve conveniently to test player candidates and to practice teamwork under game conditions. They may be used to promote the team effectively both at home and elsewhere. For some teams a pre-season overseas tour may be profitable, even lucrative. For some leagues, overseas games may promote their sport or their league to new audiences.
In some sports there may be a pre-season curtain-raiser or "supercup" competition—for example, in England, the previous season's winners of the FA Cup and Premier League play one another for the Community Shield before the start of the regular season. Part of the profits from this game are divided up amongst all teams participating in both competitions the year before, to donate to charities and good causes in their local area while the rest is given to national charities and good causes by the FA itself.
Basically league teams only play friendlies during pre season. International sides are a bit different, they play friendlies during qualification and in the run up to international competitions. This keeps their hand in. Teams that have already qualified will usually play friendlies while the play offs are going on.
They also do this during qualification matches, say a group has five teams, A, B, C, D and E. In the first tie A plays B, C plays D which leaves E with nobody to play. E would normally play a friendly with another side. That means that when E do play a competition match they won't be at a disadvantage because they've not played as many matches as the other teams.