"GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools." (from the GraphQL Website).
The WPGraphQL plugin (which is actually installed in the theme with Composer, rather than a plugin), provides a GraphQL API for WordPress.
GraphQL requires a server to be running to serve the queries. The WPGraphQL plugin provides a server that can be accessed at the URL /graphql, or via the graphql() PHP function.
The schema is automatically generated for you by the plugin, and makes all WordPress data available to you via queries.
You can define your own types and fields on the schema using the PHP functions documented on the WPGraphQL website.
Queries are written in .graphql files, which can be stored in three locations in your code.
blocks/*/*.graphql, alongside a block's .tsx file. Queries in these files will be run automatically by the server when the page is visited, and the data is passed as props to the block component. This allows blocks to query any other data on the site. Blocks can also query ACF fields defined on the block, via the global block field, which represents the current block being executed.views/*.graphql, alongside any View .tsx file. Just like blocks, the data is passed to the view's component. They can also use special variables to refer to the current post, or some querystring value.queries/*.graphql— these queries will have React hooks automatically generated for them, allowing the queries or mutations to be executed on demand by your React code. This is useful for components which need to perform searching/filtering/pagination, handle user data submissions, trigger server-side code etc.