When you have a number outside the brackets it means that number times everything in the brackets.
But you can't times everything in the brackets all at once because the things in the brackets are separated by a plus sign, so you have to times each of them individually by the bit outside the brackets.
So...
First you do the 3y from outside the brackets times the first bit from inside the brackets, which is just a y.
When you times 3y by y, you get 3ysquared. In the way your equation has been set out, this is described in the middle stage as 3yy, because yy means ysquared or y times y. I think this may be why you are confused, because when you move on to the final stage this 3yy has not changed, but they have changed the way it is writen to 3y2.
So at this stage you have done the first half of the sum but not the second half. In your equation, this middle stage has been written out as 3yy + 3y x 4
They have written it like that to show that you have already got your 3yy but now you have to do the other half of the sum which will be 3y times 4.
After doing that first multiplication, you next need to times the 3y outside the brackets with the other part inside the brackets, which is 4. So you do 3y times 4. 4 lots of 3 y are 12y. So the answer to that bit is 12 y.
So now you have the answers to the two times sums - the first bit is 3ysquared or 3yy and the second bit is 12y.
So your final thing to do is just to add those together, giving you the final answer of 3ysquared plus 12y.
I really hope this helps - my Sam really struggled so I mastered it while he was doing algebra!!