When a GraphQL query is executed, each field is resolved by checking if a custom resolver function exists. If it does, that function is called to get the field's value. If not, the default resolver is used, which simply returns the value of the field from the parent object. For example, in a query requesting a user's id and name, if no custom resolvers exist for these fields, the default resolver returns the 'id' and 'name' properties from the user object. This process continues for all fields until the full query result is assembled and returned. This behavior allows simple fields to be resolved automatically without extra code, while still supporting custom logic when needed.