Allemansrätten, or Every person's right, is a freedom in Sweden which states that everyone must have access to nature. As far as I remember, there are similar rules in other Nordic countries, but I'm not familiar with the specifics.
Naturvårdsverket is the Swedish environmental protection agency that regulates the access to nature. You can read the rules at length on their website, but for your convenience, here's the executive version:
You are allowed to hike, ski, swim, ride, cycle, camp in the great outdoors, under some specific restrictions:
- Not allowed in cities and private gardens, or on land used for cultivation.
- Not allowed in vicinity of buildings (e.g. houses) -- at least 150 m from the nearest house.
- Foraging is permitted, but hunting and fishing are expressly prohibited.
- No motor vehicles allowed without owner's permission, but if a private road is available, its use is permitted.
- When horseback riding or cycling, be careful not to damage the ground, if possible
- Fires are allowed, but naturally safety regulations must be observed.
- You can stay for a night or two in a particular spot, but for longer periods, you should ask for permission from the land owner. Or, you can just pack and go to another location.
- Special regulations apply for natural preserves and protected areas
It goes without saying that you must not destroy or damage owner's property, and must not cause disturbance.
Apart from these, the rules are pretty liberal and you are free to roam to your heart's content in the vast Swedish countryside. Enjoy your stay!