An OSPF neighbor relationship is a link between two OSPF neighbor endpoints. Each complete OSPF neighbor relationship connects two OSPF neighbor endpoints.
In order for an OSPF neighbor relationship to form between two OSPF neighbor endpoints, the underlying OSPF interfaces of the endpoints must be members of the same OSPF Area. What this statement implies is that an OSPF neighbor relationship can form between a pair of OSPF-enabled devices if and only if the devices are connected via OSPF networks that are members of the same OSPF area.