How do widgets access posts they should display?

How do widgets embedded in a page access posts they should display?

That’s not how widgets work, and implies there is a framework that provides posts to widgets. There is not. Widgets aren’t embedded either, and there is no data source that provides what they should display. Widgets decide that on their own.

So if a widget displays the latest posts, it does this because it was programmed to do that, not because it was provided the latest posts to display. Widgets don’t follow the standard main post loop system where WordPress fetched posts. A widget is an arbitrary piece of code with output, that fits into a WP_Widget class.

For example, a widget with a paginated list of posts would implement that pagination internally from scratch.

To get an answer for this, you will need to read the code that implements the specific widget you are interested in, as no generic framework exists.