A winery is a building or property that produces wine, or a business involved in the production of wine, such as a wine company.  Some wine companies own many wineries. Besides wine making equipment, larger wineries may also feature warehouses, bottling lines, laboratories, and large expanses of tanks known as tank farms. Wineries may have existed as long as 8,000 years ago.
The earliest known evidence of winemaking at a relatively large scale, if not evidence of actual wineries, has been found in the Middle East. In 2011 a team of archaeologists discovered a 6000 year old wine press in a cave in the Areni region of Armenia,  and identified the site as a small winery.  Previously, in the northern Zagros Mountains in Iran, jars over 7000 years old were discovered to contain tartaric acid crystals (a chemical marker of wine), providing evidence of winemaking in that region. Archaeological excavations in the southern Georgian region of Kvemo Kartli uncovered evidence of wine-making equipment (containers called qvevri) dating back 8000 years.  In 2017 the remnants of an 8000-year-old facility for large-scale production was found 20 miles south of Tbilisi, Georgia. 
Wineries typically employ winemakers to produce various wines from grapes by following the winemaking process. This process involves the fermentation of fruit, as well as blending and aging of the juice. The grapes may be from vineyards owned by the winery or may be brought in from other locations. Many wineries also give tours and have cellar doors or tasting rooms where customers can taste wines before they make a purchase. Winery architecture is very varied and rich and it is used by wineries as a way to promote their wines and cellar doors.
While some associate wineries with large winemaking regions such as Napa Valley  and Sonoma Valley in California, the Barossa Valley in Australia or the legendary wine regions of France ( Bordeaux, Burgundy, Champagne) and Italy, wineries can be found nearly everywhere. The east coast of the United States also has winemaking regions like New York's Finger Lakes region, Aquidneck Island, RI and Long Island, NY and Cape May, NJ. Wineries do not have to be located adjacent to vineyards; grapes can be shipped anywhere. In addition, people make wine out of other fruits and plants (dandelion wine, apple wine, strawberry wine, honey wine, passion fruit wine), so these specialty wineries tend to pop up where the other substances are grown. For example, a winery in Hawaii produces pineapple wine.
A class of winery license known as the farm winery allows farms to produce and sell wines on site. Farm wineries differ from commercial wineries in that the fruit which is the source of the wine is usually produced on the farm, and the final product is also sold on the farm. States such as New York have given a special permit to open a satellite store in a tourist area. New York's passing of the Farm Winery Act of 1976 set an example for other states to pass similar laws.
Farm wineries usually operate at a smaller scale than commercial wineries. Farm wineries are a form of value added marketing, known as agritourism, for farmers who may otherwise struggle to show a profit. 
A micro-winery can either be at a small farm vineyard is a small wine producer or may not have its own vineyard, and instead sources its grape product from outside suppliers. The concept is similar to a microbrewery, in that small batches of product are made primarily for local consumption.  The concept of the micro-winery is not as easily accepted as that of the microbrewery, however, as the general public has been conditioned to associate a winery as having a vineyard. A winery uses similar wine-making equipment as a major commercial winery, just on a smaller scale. Glass carboys and sanitary plastic pails are often seen in the facilities of a micro-winery. Typically, each batch of wine yields 23 Liters (6 US gallons). One of the primary differences of a micro-winery as compared to a typical winery is that a micro-winery is typically able to offer a wider range of wines; as it is not tied to the grapes it grows. New York State provides a specific micro-winery license  that requires the microwinery to purchase local ingredients.
The urban winery is a recent phenomenon whereby a wine producer chooses to locate their winemaking facility in an urban setting within a city rather than in the traditional rural setting near the vineyards.  With advances in technology and transportation, it is not a problem for an urban winery to grow their grapes in a remote location and then transport them to the urban facility for crushing, fermentation and aging. Urban wineries have been opened in cities across the United States including San Francisco; Sacramento; Portland, Oregon; Seattle;  Frederick, Maryland; New York; Cincinnati; San Diego; and Los Angeles to name a few. Wilridge Winery was the first urban winery in Seattle. 
Wine aficionados traditionally had to travel to remote areas to learn about winemaking firsthand and to taste the offerings of a wine producer in the setting in which they were made. Now, many urban dwellers can hop in their car for a short drive or take public transportation or even walk, and have an authentic winery experience. Many urban wineries offer productions tours and a traditional tasting room for this purpose and also offer retail sales. This allows the consumer to purchase directly from the source ensuring that wines have been stored correctly and not subjected to extreme conditions that can occur in transport which can occasionally result in spoiled wines.
A few urban wineries are also incorporating full-service restaurants or venues for live entertainment. Many also offer their customers the ability to make their own wine under the guidance of their winemaking team. Amateur winemakers can choose the grape varieties, select an appellation, make production decisions along the way and participate in the final blending, bottling and even design their own labels. This has spawned a new generation of boutique wines that are available in micro quantities as small as 30 bottles.
Winery wastewater is primarily generated during the cleaning of winemaking equipment and facilities. The quantity and quality of wastewater shows seasonal variations. Wastewater handling involves collection, possible treatment, then disposal and/or reuse.
Peak wastewater generation occurs during the "crush", in other words, when grapes are actively being processed into juice for fermentation. This process requires large amounts of clean water and results in a high wastewater output. To a lesser degree, wastewater is produced if boilers or water conditioning equipment is used.