In the OSPF, whole network (single autonomous system) is divided into smaller areas so that network is optimized. OSPF uses hello packets at first to calculate the neighbors and then the routing table is updated. For smaller network (typically up to 10 routers) single area is sufficient, but for large networks single area is not sufficient. For larger networks OSPF requires multiple areas so that routing information is limited and the routers processing capacity and memory is optimized.
OSPF uses LSA (Link state Advertisement) packets to update the routing table. There are different types of LSA packets and based on these types network is designed. Different types of area for example core area and other area requires different types of routing information. Hence to distinguish these types of network routing information is either limited or maximized.