Ascitic fluid is collected through a procedure called paracentesis, where a needle is inserted through the abdominal wall to draw out the fluid.