merge 2 objects in sculpt mode
To merge the legs with the torso, select the two objects (the legs and the torso) in either order, and press CTRL-J key. The object you select first gets merged into the object you select last, so if the first object you select is the legs, and the second is the torso, the surviving object is the torso. If the first object you select is the torso, then the surviving object is the leg object.

But why do you want to merge the legs with the body? In blender, for one element of a character (like a leg or an arm) to articulate relative to another element (like a torso) the elements need to be separate objects. After merging (or "joining") the legs to the body, moving the legs relative to the body (or the body relative to the legs) becomes impossible with ordinary modeling and animation techniques. So, if you're modeling a non-movable statue, go ahead and join the objects. If the character is to be animated, leave them separate. In fact, if the character is to be animated, you probably want to separate the legs into four objects, one object for each of the lower legs and and one for each of the upper. Similarly, when you get there, if the feet and hand are to be able to articulate, each foot and hand will need to consist of multiple objects, depending upon how detailed you want the animation to be.

To preserve the ability to animate the character, you would use a different mechanism in Blender: you'd parent one object, for example an upper leg, to another object, the torso, and in turn, parent the lower leg to the upper. There are several tutorials available on Youtube easily located by using your favorite search engine with the parameters "Blender tutorial parent objects".