State-owned companies are legally normal companies (Aktiebolag) but mainly or fully state-owned. They are expected to be funded by their sales, and not be given direct tax money. A big customer might be the state or a government agency.
Many companies originate from a former government agency. Government agencies are something different, usually funded by tax money but do also sell services, and are not an authority. The government has tried to avoid having agencies doing commercial activities, by separating out areas that compete with private companies into government-owned companies, for example within road construction. The reason is both to avoid unfair competition (because it could mean using tax money to beat private companies), and a wish to have a market economy instead of a planned economy as much as possible. Based on the tradition of avoiding "ministerial rule", the government has avoided interfering with the business of the companies, and allowed them to go international. This has been somewhat controversial. For example, Akademiska Hus which owns buildings used by universities is claiming commercial rent levels, much higher than traditionally, causing trouble for higher education.
Government agencies might do activities competing with privately owned companies. They usually are funded by tax money but can also sell services. The here listed agencies are commercial, mainly funded by sales or fees.