The fieldset element creates a block with a border. This is one block element where you can actaully see the borders of the block by default.
The legend element creates the caption (legend) embedded into the top border.

You can see from the example at the top of the W3Schools Fieldset Page that fieldsets were created to help organize data collection elements (text fields, checkboxes, etc) in fill-in forms. But fieldsets can be useful for organizing content in other ways too.

See the source code for more information.

Legend Content for Fieldset