I’d like to know how does GL_LINE_SMOOTH works…How is it implemented?

The method must be area sampling. It involves figuring out the percentage of coverage by the pixel of the line at each step.

Should check out the specification since they mention this stuff. Look at the main page for a link.