Form-based login in Spring Security is configured using the <form-login> element. The action URL and input field names can be customized, and a custom login page can be specified using the login-page attribute. On login error, users are redirected to the URL configured in the authentication-failure-url attribute, and the error message is available in the SPRING_SECURITY_LAST_EXCEPTION session attribute.