Answer hopefully will become community editable and anything wrong here will be corrected
If you sell software online, and you are located in the US in a state that has sales tax, you do need to collect sales tax, but only from the users who buy software and ship it to the state your business is in. If your business is in multiple states, you need to collect it for those multiple states. If you are in a no-tax state, you don't have to worry about this.
If you are selling software as a service, you do not need to collect sales tax.
Technically, US companies are supposed to collect VAT, although most do not. Big software merchants that resell software have this in place, like Kagi.
Use Tax is the tax you pay to your own state for products shipped to you when the person you bought them from did not charge you sales tax. Both businesses and individuals are supposed to pay this tax. For example, when you order from Amazon and live in NY state, they will not collect sales tax because they do not have a physical presence here. However, you are supposed to pay the NY State and city sales tax on your personal returns.
For NY State, when a business pays the sales tax they've collected from their customers, they also pay the Use Tax.
Most ecommerce providers will handle this for you. If however, you have to do it yourself, here's how one might do it for NY State.
Create a table called TaxRate which has the city, the jurisdiction (usually the county) and the actual tax rate.
When a user places an order, you look up the city in this table to find the tax rate and you charge them that additional rate as a sales tax line item.
When you have to fill out the sales tax form at the end of the quarter, you can group all the payments by jurisdiction to enter the amounts on the form.