Does anyone have an idea as to how to exit this mode or this tool?
Yeah that's the smart brush tool. The paint brush tool is just above or to the left depending on the toolbox orientation.
Press the B key on the keyboard.
location of tools in the toolbox:
Europe, Middle East and Africa