What is Anonymous apex code tool in salesforce developer console ?
The Execute Anonymous apex tool in the developer console runs the apex code you enter using Execute Anonymous and generates a debug log with the result of execution.
For example you have piece code and are not sure about output of code. So what you can do is, you copy paste the code with slight modification and execute then it will give you results like runtime with logs.
Steps to open Anonymous Window:-
Login->Salesforce
Navigate->Setup->Open Developer Console
Navigate->Debug->Open Execute Anonymous Window