A form allows users to enter data, that's about it. Processing that data is where the magic happens, and can be a complicated thing if you don't know where to start.
Generally people use PHP these days, and a database such as MySQL to store the account information. There are plenty of PHP login tutorials if you google it, though they are of varying levels of difficulty.
If you have a forum already, I assume it's software you downloaded, most of those should be equipped with authentication already, I would think?