You can use simple rectangle shapes to draw the box and then use the sf::Event::TextEntered event to retrieve text input, add it to a string, use that string with a text object to render to the screen within the rectangle shape.
I suggest you try everything individually first and make sure to read the official tutorials, until you understand every class in use.
Also keep in mind that there are existing GUI libraries that can be used with SFML, e.g. SFGUI, TGUI, imgui, etc.