how to set a background in sfml window
Colour? Pass an sf::Color to clear().
Image? Draw a texture rectangle or a sprite to the window so that it covers the window and before you draw anything else (immediately after clearing).
there is a game called 12 beads game and when the user crosses the other bead,how do i make the second bead disappear.
What have you done so far and what exactly are you having trouble with?
how do i make a menu in the same sfml window that redirects user to the game
There are lots of ways but an SFML-based GUI might be the simplest.
Try
TGUI or
ImGui-SFML, for example.