There are two kinds of text box in GIMP, a fixed text box, and a dynamic text box.
To make a fixed text box, select the text tool, and click and drag on the image to make a text box of a fixed size, then you can type in it and the text will wrap as you type. You can also resize this kind of text box and the text will flow inside it.
To make a dynamic text box, select the text tool, and click once on the image, then when you type the text box just keeps expanding over the edge of the canvas.
You can also switch between dynamic and fixed text boxes in the tool options for the text tool