Most thrift stores (especially non-profit thrift stores such as Goodwill, Salvation Army, St. Vincent De Paul or locally run stores like the one I manage) get their merchandise via donations from individuals. The store I manage gets donations from individual community members who are cleaning out their closets and bring us a few bags of clothing. We also work with Church, synagogue or other groups which are having tag sales to receive items remaining from the sale, and we will frequently work with family members who are cleaning out an estate and have larger items such as furniture, lamps, housewares etc. Some other sources include - landlords/apartment complex managers who bring in items left behind by past renters, colleges cleaning out dorms at the end of the semester, left over items at consignment shops that the consignee does not want back after their consignment term etc.
Our store is small so we do not really work directly with companies such as Target, but I think some larger thrift stores may occasionally do this. Some stores have policies that ban them from putting returned merchandise back onto the sales floor, so if the local shop has a generous manager they sometimes donate.