This isn't the kind of thing you can do on your own. You're going to need to contact your dentist and schedule an appointment to get this kind of issue fixed. You can take Tylenol or ibuprofen if you need to relieve the pain, but this is only going to temporarily solve your problem. Don't worry, though. Getting a cavity filled is an extremely common procedure!