Student Visa is issued to International Students on the basis of Study Permit, which they get following their admission to study at a Designated Learning Institutes (DLI) in Canada.
Study Permit and Student Visa are two separate things. Study Permit is a permission to study in Canada, whereas Student Visa is kind of Temporary Resident Visa (TRV), which allows you to enter and stay in Canada. You need both of them before you enter Canada.
Usually, the study Permit is valid for the length of your study program, plus 90 days. However this time length can vary actually depending on the length of your actual program while in school in Canada, if needed it can be extended. Students are allowed to work for 20 hours per week during the study and full time during semester breaks subject to other conditions.