If you or your spouse has lived in Canada for more than one year then you are eligible to apply to the Superior Court to get a divorce here regardless of whether you were married in Canada or married abroad.
If you are an immigrant to Canada, generally divorce will not affect your immigrant status.
If you have permanent resident (landed immigrant) or citizen, you cannot lose your status or be removed from Canada because your relationship has ended unless you have lied to authorities about your relationship.
If you have been sponsored to come to Canada and your sponsorship breaks down you will not lose your permanent resident status even if you need to apply for welfare.
If you are in Canada and have been granted refugee status, you do not lose your status because your relationship has ended. If you are a refugee claimant and your claim is based on your spouse’s situation, you might be able to separate your claim. Contact a lawyer for further assistance.