Social security in a modern sense was largely absent from Medieval Europe. Having said that, limited services were available.
On a meta-level, certain states provided a nominal level of services which maintained a base level of public order. Examples include basic sanitary measures. Sovereigns and higher nobles often kept physicians on hand for themselves, members of their families, or their allies.
The majority of services (what I think the question is driving at) was provided by ecclesiastical bodies. Religious orders often established hospitals, sometimes as stand alone institutions, sometimes as incorporated into the quotidian live of a particular convent/monastery. Crusading orders also established medieval healthcare centers (and all the implications "medieval" lends itself to) in the Holy Land for Christian communities. For Rome, there was an office among the Curia (read, cardinalate) dedicated to public works, which included duties from the maintenance of sites of antiquity to establishing orphanages and poor houses. However, much of time, the monies allocated for the office's operations often ended up as a stipend for the designated official, rather than providing for the office's stated obligations.
Another method of a 'social safety net' was administered through a state/Papal almoner. The Papacy and European monarchs, from time to time, appointed official almoners, who were responsible for distributing funds to the poor. This was tied to religious life, and often minimal funds were distributed on dates which coincided with major feast days (Easter). By no means was the office of the almoner continually maintained or functional.
Ideological, these services were distributed to fulfill spiritual duties, done as a penance or as a spiritual act of mercy. This is an important distinction, as modern social services in the US, Europe, and elsewhere are often given in a spirit of humanitarianism, the upkeep of a citizen's basic dignity, and as en economic fall-back, meant to relieving but also temporary.
Hope this helps.