When you overpay your credit card bill, it remains in your credit card account which can be used for future purchases. However, if you want to claim a refund, you will have request it in form of writing or contact the customer care over phone for refunding.
If you have accidently overpaid a huge amount, it could raise suspicions of fraud, hence be cautious of how much you pay back on your credit card bill.