Yes, you can use custom coded solutions. And yes you can also use CMS like WP.
Heres a WP plugin that might help you out: its called: paid-memberships-pro
I have wondered on how do people create course websites. I know it shouldn't be that hard but where would someone start.
for example this course shows a list of video that course covers. Once you scroll down, you can buy the course.
Once you buy the course you get an account made just for you and only one person can use that account. Once you login, you're able to view the videos and start learning.
How is this achieved, is this all custom coding? or word press? or..?
Yes, you can use custom coded solutions. And yes you can also use CMS like WP.
Heres a WP plugin that might help you out: its called: paid-memberships-pro