A budget surplus is when the government takes in more money in a given year than it spends. This doesn't happen very often with the U.S. government but it has happened a few times in the past 100 years.
Regarding the second part of your question about the GDP to debt ratio, we usually talk about the debt to GDP ratio and not the GDP to debt ratio. It is easy to switch these words/terms around and doing so changes things completely. I'll answer the question as if you meant to ask about the debt to GDP ratio.
The debt is how much money the government owes. This is different from the deficit. Think about it this way: a person can have a large debt from, say, borrowing money to buy a house. That same person can have a deficit if he makes $50,000 in a year and spends $60,000 in the same year. On the other hand, a person can have a debt, again from borrowing money for a house, but make more in a given year than he spends. In this case, he would have a debt but not have a deficit. Now, consider that same person later on in life after he has paid off his house. At this point, he may not have a debt at all but he may, or may not, have a deficit depending on how much he makes compared to how much he spends.
The government's debt, then, is different from the government's deficit in any given year. The U.S. government usually has deficits year after year and these have added to up to create a debt.
The GDP is completely different still. The GDP is a measure of the size of a country's economy in a given year. It is, essentially, how much money changes hands within a country in a given year.
This brings us to the debt to GDP ratio. While these numbers (i.e. the debt and the GDP) are not related, we often talk about them together in this ratio. If the government owed (i.e. had a debt) of twenty trillion dollars and the country's GDP in a given year was also 20 trillion dollars, we would say there is a 100% debt to GDP ratio. Here's a website with a nice chart about the debt to GDP ratio since about 1970: https://www.macrotrends.net/1381/debt-to-gdp-ratio-historical-chart Even back in the 1990s, when the government's debt was about 50% of the GDP, there was not a negative debt to GDP ratio. We could get that debt to GDP ratio down to zero by not having a debt. The only way to get the debt to GDP ratio to negative would be if the government was owed more money than it owes.
This brings us to the most complicated part of your question. A budget surplus does NOT automatically mean a negative debt to GDP ratio. Think about the numbers above where the government has a debt of twenty trillion dollars and the GDP is also twenty trillion dollars. Now, imagine the government is able to balance its budget next year and even bring in a surplus of one dollar. In this case, the government would still have a debt of about twenty trillion dollars and the GDP would still be twenty trillion dollars. Therefore, a budget surplus does not necessarily change the debt to GDP ratio.