What this means is that there is a certain number of units of a product that a firm should make in order to make the maximum possible profit. That number is always the number where the marginal cost of making the last unit is equal to the marginal revenue that is derived when that unit is sold to a customer. If a firm makes more or less than this number of units of product, it will not make its maximum possible profit.
Marginal cost is the cost of making the next unit of whatever it is that your firm produces. It is not the average cost of making each unit of your product. It has only to do with how much it costs to make the next unit. Therefore, it does not take into account things like fixed costs. It is simply the variable cost of making the next unit.
Marginal revenue is the revenue that you gain when you sell the next unit of your product to a customer. It is not the average price that you charge for each unit or the total amount of money that you get for selling. Instead, it is simply the price you charged for the last unit.
To determine how many units to make, a firm must determine when its marginal cost will equal its marginal revenue. That is the number of units that will always result in the highest possible profit.