Compare and contrast social insurance and public assistance. Which of these would Social Security fall under?

Compare and contrast social insurance and public assistance. Which of these would Social Security fall under?