TLDR: if you change plan, you'll receive credit for the unused portion of your old plan.
When you change plan changes during a billing cycle, a "proration" is applied on your next invoice. So if you change to a more expensive plan during your current plan billing cycle, you'll receive a credit for the unused portion of the old plan and you'll be billed for only the remainder of the month for the new plan.
The prorated amount is calculated down to the second by Stripe, which we use to handle subscriptions. They calculate the difference between the two plans based on the time the change was made on your subscription and the current billing cycle start and end times.