Ink Sacs are obtained by killing squids and glow squids. Journeyman-level librarian villagers buy five of them for one emerald, so a squid farm doubles as an emerald farm.
Ink Sacs are primarily used to craft black dye, which is used for coloring wool, leather armor, beds, glass, terracotta, and candles. They can also be used to craft books and quills and to create patterns on banners.