A widget is a small, self-contained piece of a user interface that handles one specific task. A search box, a date picker, a live chat bubble, a weather panel: each is a widget. You drop it into a screen and it does its job without the rest of the page needing to know how it works inside. That self-contained nature is the whole point.
Think of widgets like kitchen appliances on a counter. The kettle boils water, the toaster makes toast, the blender blends, and each one is a neat little unit you can move, replace or swap out without rebuilding the whole kitchen. In software the same idea makes interfaces easier to assemble and maintain, which is why teams collect their proven widgets in a component library and reuse them across pages. Build a solid date picker once and you stop rebuilding it on every new form. A widget is really one piece of the larger user interface.
Some widgets are built in-house and some come from third parties, like an embedded booking calendar or a chat tool you paste into your site. Either way, good widgets stay consistent with the rest of the design and respond well on different screen sizes. The trade-off with a third-party widget is control. You get it running in minutes, but it loads its own code, so it pays to check what it does to your page speed before you commit.
At TopDevs we build widgets as reusable parts during UI design, so a calendar or a stats panel looks and behaves the same everywhere it appears across your product.