That is one of my favorite scenes from one of my favorite movies. I always wondered just how much of the movie battle scenes were portrayed as they actually took place.
As for the square, we were shown how to present the bayonets, rifles held horizonal overhead, so the rear rank could take out the riders, if they come close enough. Ideally, the infantryman would spear the rider and toss him off the horse.