Sales tax is tax on buying a good. Sales tax is based on a percentage of how much is spent. Sales taxes first became widespread in the U.S. in the 1930s, and remain a major source of state and local revenue. Services and medicines are usually not taxed, while food may or may not be taxed.
Until 2018, purchases made over the Internet were not subject to sales tax unless the taxing state could show a "nexus" (relationship) between the state and the business. Previous Supreme Court rulings (Bellas Hess, Quill, and Direct Marketing Association), all rendered during the era when mail-order catalogs were predominant and e-commerce was in its infancy, required that the business maintain a "physical presence" in the state (such as a warehouse or retail store) or else the state could not tax sales in the state. In response to concerns that state and local governments were losing revenue (both due to the popularity of untaxed e-commerce and the decline in traditional "brick and mortar" retailers, the latter of which had to collect sales taxes), in 2017 South Dakota passed a very specific law requiring e-commerce retailers with sales over $100,000 or having over 200 transactions with South Dakota residents to collect sales taxes. The law was designed specifically at large e-commerce retailers (the resulting case is popularly known as Wayfair, for the large furnishings retailer) for the purpose of challenging the original ruling in Quill. In June 2018 the Supreme Court overruled its prior decisions and ruled that South Dakota could implement the law.