This introduction is based on the Shulchan Aruch: Shin Shamech Beis (345).
A mechitza is a wall or fence.
The minimum height of a mechitza is 10 tefachim from the ground.
The bottom of a mechitza must be connected to the ground.
A mechitza can not sway in a common wind.
1 tefach is between 3.5 and 4 inches (there is a difference of opinions).
There is a principle discussed in the Shulcan Aruch called “Lavud.” Lavud means that any two objects within three tefachim of each other is considered connected. In the case of a mechitza, if two walls are 3 tefachim away from eachother, they are considered connected. Hence, we can allow for gaps (vertically and horizontally) in our walls of less than 3 tefachim. Because of lavud, a picket fence is often acceptable to be used in a Eruv.
There is a principle called Omed Meruba Al HaParutz which allows for gaps larger than 3 tefachim if the gaps meet certain criteria. This principle is complex, and to understand where and how it can be used, one should speak to a Posek.