There are several ways:
(1) use 'getBackground().drawString("xxxxxx", 20, 30);'; you may have to change the drawing color of the background image before drawing the string; also, you may want to alter the drawing Font
(2) create a text GreenfootImage using the constructor that requires a string and then use 'getBackground().drawImage(textImage, 20, 10);' to add it to the background image
(3) create a text GreenfootImage as in (2) above and set it to be the image of an actor and add the actor into the world
The easiest to remove and the simplest to use is (3). If you have a flat background color (not patterned or designed or pictured), then it would not be too difficult to remove when using (1) or (2) (re-drawing the text in the background color), unless it is the only change to the background image, where you can restore the background image itself.