The simplest case is that your credit card application is not approved, as long as you stop applying. If you just applied, you can go to the bank branch counter and tell the staff that you don't want to apply for a credit card, and I'll cancel it for you. If it's too much trouble, you can call the bank customer service to cancel.
If the card has been approved and the credit card is on the way, you can call the bank's customer service phone after the credit card arrives, explaining that you don't want to do it, and the staff will help you handle it.
Finally, I want to remind you that our credit card and credit history are closely related. Don't blindly apply for a credit card, or you will regret canceling it.