Only making this a comment because I'm not a master of coding or anything, but I believe creating this user system usually requires a script (Presumably Java) to tell the website how to organize user info when people sign up. You use a database/spreadsheet to organize the info they send in, and from there, it's about linking interaction between the database and website together with more code and scripting. It's pretty high-level stuff if you want to build it from the ground up.
Many websites borrow open-source scripts though, which are basically scripts you can install onto your site that are already made by other coders. Like SF said, a simple Google search may give you some open-source scripts that are free to use. Googling something like, "User membership software" or something to that effect may provide answers. Depending on the web platform you're building the site on, however, this may not be possible.