When Jerry sees the group of boys, he finds himself drawn to them. They are 'big boys, men to Jerry' and he wants to be a part of their group.
To be with them, of them, was a craving that filled his whole body...In a minute, he had swum in and was on the rocks beside them, smiling with a desperate, nervous supplication.
When the boys make way for Jerry to dive beside them, he is ecstatic:
He dived, and they watched him; and when he swam around to take his place, they made way for him. He felt he was accepted and he dived again, carefully, proud of himself.
Jerry tries to perform the same feats as the boys so as to be accepted into the group. When he discovers that the big boys have a new trick which he has yet to figure out how to do, he is crushed. The boys are swimming through an underwater tunnel to emerge on the other side of the barrier of rock, and Jerry becomes frantic that he cannot reproduce this feat. He makes faces, shouts out some rambling combination of French words he knows, and generally tries to regain their attention.
They looked down gravely, frowning. He knew the frown. At moments of failure, when he clowned to claim his mother’s attention, it was with just this grave, embarrassed inspection that she rewarded him.
I have bolded the words above and below to show that this is how Lessing explains why Jerry makes faces and shows off; he is desperate to regain the boys' attention and he resorts to doing much the same thing when he is trying to claim his mother's attention. Here is a boy desperate to claim his place among his peers and to find his place in the world.
They were leaving to get away from him. He cried openly, fists in his eyes. There was no one to see him, and he cried himself out.
Hope this helps!