You would have to get a tourist visa to Canada before you could claim asylum here. You can't claim asylum from Pakistan.
If you can get a visa, you would have to travel to Canada and then once you land you can claim asylum here. Getting asylum is a hard and difficult process and you will need to prove that you require it.
If you applied for a TRV and you were refused, then you and your family will have to leave Pakistan and move to another country and seek help from UNHCR there. You cannot apply to Canada directly.