The Public Deed usually takes place with a Notary who will oversee the entire Puchase Process (checking all the documentation of the parties involved in the deal and the property, checking the methods of payment for the transaction). There are other services including "Casa Pronta" where you can now fulfill the process without using a Notary.
Some buyers, sometimes, give a Power of Attorney to their lawyer to legally represent them throughout the process of buying their property, namely: arranging for the Portuguese tax number to be obtained (if necessary), signing the CPCV and Public Deed, among others. This is a very common practice when the buyer lives abroad and can't/won't travel to Portugal every time there is something to deal with or sign.
After the Public Deed, the definitive registrations in favour of the buyer are made at the Land Registry, thus making the property belong to its new owner.
Other steps that make up the process of buying a property in Portugal: