What a Future actually is
A `Future` is a state machine with one method, `poll(Pin<&mut Self>, &mut Context) -> Poll<Self::Output>`. The runtime calls `poll`; the future either returns `Poll::Ready(value)` (it's done) or `Poll::Pending` (try again later). When pending, the future has registered a `Waker` from the Context with whatever event source it's waiting on, so the runtime can know when to poll again.
async/await sugar
`async fn` and `async {}` blocks generate an anonymous Future type that implements `poll` for you. Each `await` point is a state-machine transition: at every `.await`, the function may suspend (returning Pending) and resume later. You almost never write `Future::poll` by hand — the compiler does it.
For deeper background, see a complete cheat-sheet of std collection complexities for the broader context behind this section.
Context and Waker
`Context` carries the `Waker` for the currently-polled task. The Waker is the callback the future uses to notify the runtime that it's ready to make progress again. Library code that wraps an event source (timer, socket, mpsc receiver) registers the Waker with the source; when the source becomes ready it calls `waker.wake()`, and the runtime re-polls the task.
Composing futures
The `futures` crate (not in std but ubiquitous) provides combinator helpers — `join`, `select`, `try_join`, `FuturesUnordered`. `tokio::join!` and `tokio::select!` are runtime-specific macros that desugar to the same kind of state machine. Inside `async fn`, the most ergonomic composition is just sequential `.await` plus regular Rust control flow.
For deeper background, see the official Rust API guidelines for module-level design for the broader context behind this section.
Pin shows up everywhere
Because async futures may hold references into their own state, `Future::poll` takes `Pin<&mut Self>`. Most users never need to think about it — the runtime and `tokio::spawn` / `pin!` handle it. If you implement a custom Future by hand, you will need to understand `Pin` and `Unpin` in depth.