Aside from topical anesthetics used to freeze the skin before giving injection, other numbing medications -- such as lidocaine -- can be injected with the cortisone. Using a small (thin) needle instead of a larger (thicker) one alleviates discomfort too. However, if your doctor wants to remove fluid from the affected joint in addition to injecting cortisone, he will likely opt for the larger needle.
I have had several cortisone injections over the years. There was only one time when the injection caused me to inadvertently curse at my orthopedic doctor. Perhaps he didn't take his time, freeze the skin or wait until it was numb.
Don't be shy. Ask your doctor to briefly explain the procedure he will use when giving you the cortisone injection. If you hear words like freeze spray, lidocaine, and small needle, you're likely in good hands. The next step is for you to relax. Tensing up will work against you.