Försäkringskassan is a government agency that administers social insurance. They investigate whether people are entitled to compensation and if so, the agency pays it out. This covers, for example, compensation to families with children, people who are sick and people with disabilities. It does not cover pension, which is handled by the The Swedish Pensions Agency.
To receive compensation from Försäkringskassan, you must be insured in Sweden. Information on who is insured in Sweden and what this means can be found on the page Insured in Sweden.
If you come to Sweden from a country outside the EU/EEA or Switzerland, you need a residence permit from the Swedish Migration Agency in order to receive compensation from Försäkringskassan.