The length of a pendulum affects its swing because longer pendulums swing at lower frequencies. A lower frequency causes a longer period and a slower rate of swing.
A pendulum is something that hangs from a fixed point and has a mass, or bob, at the other end. When a person pulls the bob back, the force of gravity accelerates the bob down and causes it to accumulate momentum. Because of this momentum, the pendulum continues past the lowest point of the swing and up in the opposite direction until it reaches the same height as its starting point. The pendulum does this because of inertia, which is the tendency of mass to stay in motion when a force acts upon it. When a pendulum swings in one direction and then comes back to its original starting point, this is called a period. A pendulum's frequency is the number of periods it completes in a certain amount of time.
A pendulum's length affects its period and frequency much more than other variables do. For example, starting the bob higher only changes the frequency a little bit. Increasing the mass of the bob doesn't affect either the period or the frequency at all.