Monthly plan credits come with any paid subscription — monthly or annual. These credits refresh every month on your billing day, resetting to your plan's full allowance. Unused credits are forfeited at the end of each cycle, except on the Max plan, where up to one month of unused credits roll over to the next month. If you've cancelled, your balance resets to 0.
Not sure when your billing day is? Check here.
Purchased credits are bought separately starting at $10 ($0.01 = 1 credit). These never expire when unused and aren't affected by your billing cycle.
When you run a generation, monthly plan credits are always used first since they would otherwise expire. You can't manually choose which balance to spend from.
For more on how credits work, see How do credits work?