Whenever a discount is applied on the current price this is what happens in the backend:
The app will use the Price column of the product/variant and calculate the discount at the backend:
The newly calculated discounted price will then be inserted in the Price field while the original Price will then be inserted into the Compare at price field:
When the sales campaign had expired or disabled, the price will be reverted back to the one shown in 1.
If the merchant edits the price when a discount rule is active, when the discount rule is disabled, the original price stated in 1(a) will not be reverted. Instead the new Compare at Price will be used to replace the Price field while the Compare at Price is left blank:
Price is modified while Discount Rules are Active
After Discount Rules are Disabled