You can submit your application for a Swedish residence permit online through the Swedish Migration Agency's website, Migrationsverket. After applying online, you will need to provide any requested documents to a designated submission officer. There, you submit your application to your local VFS Global centre or a Swedish consulate/embassy in your country.