Hi Sanchez. Although the various other posts are right, and you really should work this out yourself I'm going to offer a little help by explaining a bit. Please note that everything I'm going to say I have learnt myself from W3Schools. You really should check it out if you want to understand anything properly.
The for creates a loop until a specified goal is reached. In your example it's all the time the variable is less than 3.
The next bit declares the variable ($x=0). Hopefully you can work out what that means.
The next bit is the statement to check against before continuing the loop. As I said, in your example it checks to see if the variable is less than 3.
$x=$x+1 reads the variable X and adds one to it.
I'm going to leave you to work out what the output would be. Although just running it would be an option I suggest you try and work out the output before you run the code to ensure you have an understanding. If you get the number wrong then you know you'll have to go back and better your understanding.
If you're genuinely interested and want to learn then I'll be happy to help, and create a few exercises for you to work on. If, however, you have no interest in learning and just want us to do your work for you then please don't waste our time.