The surplus was the result of the the tech stock market bubble. You had tech startups throwing stock options around like confetti. People were cashing them in as soon as they were allowed to, resulting in huge capital gains tax receipts. Prior to the tech bubble there were no balanced budgets in the Clinton years. When the bubble popped so did the capital gains.
The other factor in the surplus was spending restraint that was the result of having a Republican congress. Something called Hillarycare was DEAD after the GOP took over Congress in 1994. These same dingbats who keep crediting Clinton with budget surpluses are in favor of Obamacare and presumably were in favor of Hillarycare - or would have been if they were older.