Suppose an ideal Atwood machine is pulled by a constant force $F$ against gravity. I am unable to understand the dynamics of the system. Do the blocks move in such a way that the "increase" in length of the string is cancelled out? How are accelerations decided here? I know the acceleration of the pulley is the average of the accelerations of the blocks, but how does it physically work?
Well, there are a lot of flaws in your understanding of Atwood machine. Let's clarify some of them first:
1)I know the acceleration of the pulley is the average of the accelerations of the blocks
This statement is not correct and yes it may work at some places I would recommend you to stick with concepts rather than shortcuts.(Well I wouldn't even call it a shortcut because it is only for a very few number of cases).
2)Does one of the blocks connected to the pulley increase its speed such that the "increase" in length created by the motion of the pulley and the other block is cancelled out?
Now this statement in itself is not wrong that the length of the string is conserved, but the speed explaination seems to be weak.
Even the energy of the system is not conserved because earth will be applying net force on out system which will indeed not keep energy as well as momentum conserved(I hope you have studied it).If not then no worries.
But there is a very special property of atwood machine which is so incredible that you can solve nearly any problem in Atwood machine.The property is :The net work done by the tenion force is alaways zero. It is such a powerful feature that I never need to worry about Problems relates to atwood.
These is only one procedure:Caluclate the work done due to tension and put it equal to zero.
from here you will find tension and thus by newton second law you could find the acceleration of the block.
It will require you some practice to understand what I have written but once you will have good hands on this concept you will understand the power of this method. I will again warn for your future journey in physics that don't rely upon shorcuts and gut feelings, when you are new to a concept. Take you time in understanding the concept.