A legacy is a gift of a specific sum of money or some other item or asset. Unlike residuary gifts a legacy is something specific and not a share of the whole of your estate.
Legacies are typically used for smaller gifts to friends and family who you want to be beneficiaries under your will.
A legacy will be taken out of the residuary of your estate so if you leave a large or valuable legacy the residuary beneficiaries will receive less.
Beware also legacy gifts given free of inheritance tax. The inheritance tax will be taken out of the residuary estate. Again the residuary beneficiaries will receive less if you have an estate that is subject to inheritance tax.