Economists always like to talk about the ideal situation of perfectly competitive markets. This is the world in which there are vast numbers of buyers and sellers so that no individual buyer or seller can affect the price. In this world, every producer is a price taker. This means that the price is set by the market, and they can sell as much as they want to produce at the prevailing market price.
In the real world, this is not an accurate description of most markets, which have a relatively limited number of sellers. The one market that does seem to fit the competitive story reasonably well is agriculture. Farmers see a price in the market for corn, wheat, soybeans, etc. and they can sell as much as they choose at this price.