Probably not a building permit, but very likely a zoning permit. Fences are one of the projects where the two approvals split cleanly, and knowing which one applies saves you a phone call that ends in "you should have asked first."
The building permit side
Pennsylvania's Uniform Construction Code exempts fences that are no more than 6 feet high from the building permit requirement. That covers the typical backyard privacy fence, picket fence, or chain link around a yard. Go taller than 6 feet and the exemption no longer applies.
There's a catch built into that exemption. It only holds if the work doesn't violate a local law or ordinance. So the state staying out of it doesn't mean your municipality has to.
The zoning permit side
Most fence rules in Delaware County live in the local zoning ordinance, and many municipalities want a zoning permit before a fence goes up. The details vary from town to town, but the questions they care about are pretty consistent.
Height limits usually depend on where the fence sits. Front yards often get a lower limit, commonly around 4 feet, so the street stays open and drivers can see. Side and rear yards are often allowed up to 6 feet. On a corner lot, there's usually a clear sight area near the intersection where fences, walls, and hedges have to stay low or out entirely. Some ordinances also require the finished side of the fence to face the neighbors and the street, and some restrict materials like barbed wire or electric fencing in residential districts.
Your zoning officer is the person who knows the specifics for your property. If what you want doesn't fit the rules, a variance from the zoning hearing board is possible, but that's a hearing process, not a counter visit, so plan accordingly.
Know where your property line actually is
Neighbor disputes over fences almost always come down to the property line. The edge of the lawn, an old fence, or a row of shrubs is not a survey. If you aren't sure where the line is, find your survey pins or have a surveyor mark them before you dig. Many people set the fence a few inches inside the line on purpose, so there's no question about whose fence it is and so they can maintain both sides.
Check for easements too. A utility or stormwater easement across the back of a lot is common, and a fence built inside one may have to come down, at your expense, if someone needs access.
Pool fences play by different rules
If the fence is also the barrier around a swimming pool, it's not just a fence anymore. Pool barrier rules generally call for a minimum height of 48 inches, limits on openings and footholds that a child could climb, and gates that are self-closing and self-latching. Those requirements come with the pool permit, so if a pool is in your plans, talk to the building department about the fence at the same time rather than building it first and hoping it passes. The pool permit guide covers the barrier rules in detail.
Historic districts and HOAs
If you live in a historic district, a fence visible from the street may need review before it goes up. On this site, Chadds Ford, Media, Radnor, and Ridley Park all have that kind of review board, and the FAQ on historic districts explains how it works. Separately, if your neighborhood has a homeowners association, its rules on fence style and height apply on top of whatever the municipality allows.
Before you dig
Fence posts mean digging, and Pennsylvania law requires a call to PA One Call (dial 811) before you excavate, at least three business days ahead. Utilities will mark their underground lines for free. Hitting a gas or electric line with a post hole digger is a bad day you can easily avoid.
The order that works: call your municipality and ask whether the fence needs a zoning permit and what height limits apply to your yard; confirm your property line; call 811; then build. If a contractor is doing the job, ask who is pulling the permit. Skipping the permit tends to come back later, either through a neighbor complaint or when the house sells and the work shows up in a resale U&O inspection.
More
Find your municipality's permit and zoning contacts. See also the permit FAQ, the glossary, Do You Need a Permit to Build a Deck in Delaware County, PA?, and Do You Need a Permit for a Shed in Delaware County, PA?.