What is the Withdrawal Agreement and who will benefit from it after the end of the transition period in terms of residency?

The Withdrawal Agreement is a legal document that provides a legal framework on some aspects of the separation of the UK and the EU (such as residency rights of current residents and a protocol on the Irish border), and contains a political declaration (non binding) about what a future relationship should look like. 

On the residency aspect, it is stated that UK nationals must be lawfully residing in Spain before the end of the transition period to enjoy their rights from 1 January 2021 onwards. 

The documents stating legal residency will be the proof and guarantee to continue enjoying the same rights as before 31 December 2020.