This depends on the structure of your plan and whether there is a discount and a lookback feature for the purchase price.
For example, in a common arrangement for plans that receive special tax treatment under Section 423 of the tax code, the price of your company's stock at the end of each offering (or purchase) period is compared with the stock price on the ESPP start date. The price you pay can be up to 15% less than the lower of those two stock prices. Your company will specify the discount that applies before the offering begins.
Example: When the share price goes up
Price on first Wednesday of January (grant date): $25
Price on first Wednesday of July (purchase date): $30
What you pay: $25 minus 15% (or $3.75 discount) = $21.25
Example: When the share price goes down
Price on first Wednesday of January (grant date): $25
Price on first Wednesday of April (purchase date): $20
What you pay: $20 minus 15% (or $3 discount) = $17
See the FAQ on ESPPs that are not tax-qualified under Section 423. Their structure can vary (e.g. share match instead of discounted purchase price), or they may not include a discount beyond waiving the commission.