A foreign national with a heavy criminal record or who was part of crimes against humanity, will be considered inadmissible to Canada, understandably. But of course, not all people who hold a criminal record or have been in the vicinity of persons of questionable morality are inadmissible to Canada.
Different factors will be taken into consideration depending on what immigration authorities are worried about regarding your background. But as a general rule, a professional opinion should be sought as soon as there is a criminal record or as soon as suspicions can arise from your background. Security and criminality issues are taken very seriously by the Canadian government. That being said, there is hope for those who, although they fall into this broad category, are not dangerous or of bad morality.