It depends on which course you are doing. If you are doing a PR enlisted course which is also listed in the SOL list and getting regular invitations, it may take 3-4 years to get the PR. However, there are some occupations getting PR invitations earlier than that. Moreover, if your course is not enlisted and you are doing a diploma/graduate diploma, not completing your course on time, getting PR will be delayed (for example, 5-6 years sometimes)
Please do remember, you also need to obtain specific points to be able to apply for the PR. If your points are fewer, you may have to spend more time increasing the points. This will also increase the waiting time.