Segmentation concept in x86 architecture:
It (Segmentation implemented by the OS) partitions the addressable memory space into smaller protected address spaces called segments. A segment can hold code, it can hold data, it can hold a stack and also there are some system data structures like TSS and LDT, GDT, etc. Every segment in the memory will have its privilege level, it provides isolation between different programs running also provides isolation between the segments (code, data, etc.) of the same program.
A lot more happens to achieve the segmentation. Modern operating systems use a combination of segmentation and paging, though the more focus is on paging for memory management and protection.