As we know from Defense Against Dark Arts, year 4 (as told by Barty Crouch Jr impersonating Alastor Moody), Avada Kedavra can not be blocked:
"Not nice," he said calmly. "Not pleasant. And there's no countercurse. There's no blocking it. (GoF, Ch 14 - THE UNFORGIVABLE CURSES)
Yet, in the middle of a battle, when Voldemort was threatening the lives of people, Harry did in fact cast blocking curses.
Now, this is Harry Potter we are talking about - not necessarily the greatest academic mind, but a very gifted duelist with excellent on-the-spot thinking and usually correct reactions.
So why was he casting blocking spells that he knew full well would not work against Avada Kedavra, instead of, for example, attacking Voldemort ASAP to distract him?
First, right after Neville killed Nagini and Voldemort was about to kill him:
Hidden beneath the Invisibility Cloak, Harry cast a Shield Charm between Neville and Voldemort before the latter could raise his wand. (DH, page 733)
Please note that this was fairly clear that the Shield was to protect against the killing curse; since Voldemort already tried to hurt and torture Neville, and killing him for destroying his las Horcurx would have been the only predictable response for Voldemort.
Second, in a similar circumstance, to protect Molly once she killed Bellatrix:
Voldemort raised his wand and directed it at Molly Weasley.
“Protego!” roared Harry, and the Shield Charm expanded in the middle of the Hall, and Voldemort stared around for the source as Harry pulled off the Invisibility Cloak at last. (DH, page 737)
Same story - Voldemort was super-mad and definitely about to kill. So casting a blocking shield curse that would have blocked some other spells would have been a waste of time/effort.