I am new to economics in school and we are going over supply and demand. This may sound like a very simple question, but I just need one thing clarified. When quantity is mentioned in the graphs is that referring to our total inventory or just the number of units sold? Thanks.
Demand and supply are functions indicating the price at which a certain quantity would be traded. They represent the intentions of producers and consumers to buy or sell a given quantity at a certain price. Reciprocally, you can consider that these curves show you, for a given price, how much the producers would sell and how much the consumers would buy.
Now in reality, for the portion of the demand curve which is higher than the supply curve (ie. Consumers would buy the quantity at a higher price than producers would sell it), the market clears the quantity in question at whatever price lies in-between. The portion of the graph where the demand curve is below the supply curve can contain some inventory: that's exactly what the order book of a stock exchange is, with bid (buy) and ask (sell) offers.
Q refers to a potential. The equilibrium Q is the one which actually occurs (although real economies are more complicated than that). In practice, firms stock inventory of their goods, anticipating demand based on their expectations. Firms normally do not operate on a Japanese-style "just in time" basis (google the concept). It's risky. They keep stock. Sometimes the stocks last for long.
In accounting also firms operate on different basis. There is the FIFO and the LIFO, which are different ways to manage production, demand and inventories. You can read https://en.wikipedia.org/wiki/FIFO_and_LIFO_accounting for more information.
In a typical price-quantity graph, such as this for a monopolist from Wikipedia, the quantity is the amount produced and sold