Is my understanding of how a force is applied through a string correct? Let there be a situation where a force 'F' is acting on one end of an in extensible string which is connected to a box named 'A' resting on a friction less horizontal surface through the other end.

The Force F is transmitted through the string and acts on box 'A'. As a reaction to this box 'A' pulls the string toward itself with force 'F'.

In the FBDs we can see that the string is balanced by the forces but the box is not, so the box starts accelerating towards the right. As the box starts to accelerate, for a very small moment there is slack in the string which makes the tension force 0 for a brief moment.Then the force F being applied on the string is used to make the string taut again and tension forces again begin to accelerate box A.
This keeps repeating itself.
Is this how it works or there something wrong?
 A: 
As the box starts to accelerate, for a very small moment there is slack in the string which makes the tension force 0 for a brief moment.

Wrong.
Tension is zero before the force is applied. Once the force starts acting and the string becomes taut, the block and string gain the same acceleration and the string doesn't slack again.
A: There is a mistake in modeling the system. Indeed, the string is not a rigid body and you can't use the rigid body equations of motion and to be expecting that they will work. You consider, for example, in place of the string, a rigid thin (metallic) rod. In this case, you can consider the box and the rod as a unique rigid body on which the only acting force on x direction is the one you have drawn in your fist picture. So the whole body moves with a constant acceleration on x direction. While, how I said, if you want to consider the string, you have to use proper equations that take into account the physical properties of the string and which will lead to a realistic result.
