An assignment and assumption agreement is used after a contract is signed, in order to transfer one of the contracting party's rights and obligations to a third party who was not originally a party to the contract.
Yes, you can write your own contract. However, including all necessary elements is crucial to make it legally binding.