Depends. If is is pain, then going to the dentist and treating the cause is the only long term solution. If it is your being prone to dental problems, then brush 2x per day for 2 minutes each time, floss 1x per day, and use a tongue scraper 1x per day.
Pain meds. Tylenol, (acetaminophen) Ibuprofen for pain and inflammation. Otherwise, prescription antibiotics and extraction of the diseased tooth is the ultimate treatment.