My AC Unit in my attic is roughly 10 years old, still heats/cools exactly as it should, but I noticed yesterday that the drip pan is overflowing.
What do I need to do to get the drip pan to drain? And what is causing the drip pan to fill?
I had a problem like this many years ago. I did some experimenting:
I concluded there was a pressure problem and the condensate drain pipe would work correctly if I added a vent.
Here is a picture of one person's solution. It doesn't look too elegant, but it illustrates the method.
My drain pipe ran from the condenser to an elbow, and then vertically downward, IIRC. I just replaced the elbow with a tee and added a short length of pipe at the top of the tee, leaving it open at the top end.
Problem solved, in my case.
Now, it had been working fine before all of this happened. But the problem showed up just like you described it. I don't know why or how it was working before I did this, but I never had trouble again.
First - why is your drip pan filling?
Because the process of cooling air requires the use of a condenser which gets very cold. Humid air when it contacts cold surfaces causes moisture in the air to condense (think how a glass with cold liquid gets condensation on it).
This water falls off the condenser and into the drip pan.
Second - Why is your drip pan over-flowing?
Sounds like your drip drain is clogged. You should try to run a thin snake through the entire drain. Hopefully the drain pipe is big enough to allow this.
Do NOT put drain cleaner in the pipe as, as you've seen, it will drain into your yard and cause damage to plants.
Often this happens because your drain line goes outside. You've got a cool, moist and dark pipe so algae can grow there. More modern installs tend to try and put it into a vent stack inside the attic, where it's not as likely going to be a problem.
There's a couple of ways to deal with this