The money will indeed be kept on your account. If you have a postpaid account, the second payment will remain on your account and will be shown with a minus sign in front of the amount. You can verify this by accessing your account balance through your online account or through the application.
And to answer your question, you're correct, the balance will be used to pay for your next billing cycle. You can make sure that it covers your next monthly fee by verifying your upcoming invoice.
Hope this clarifies.