I am from UK where apartments ( flats ) are sold as " leasehold" as apposed to "freehold" which applies to most houses.
Is this the same in Portugal?
Firstly, as has been mentioned by others, always use a proactive Portuguese lawyer for property transactions - all relevant details should be checked by them, and explained to you in terms specific to the property in question.
Leasehold is not a concept in Portuguese law - there can be unconventional arrangements which may seem similar (but they're unusual); and you may find some people misdescribing things in those terms.
The key concept is propriedade horizontal, which is often glossed (notably by non-Portuguese speakers) as the condominium setup. It is safe to assume that pretty much all apartments follow this regime; as do many resort-like developments - but also other multi-occupancy buildings which might not, in other countries, be considered to be condominiums (eg larger houses later subdivided into units).
A building classified as propriedade horizontal will be so described in its official paperwork - and in that instance, each owner is responsible for their share of the building upkeep based on the established proportions (in permilagens - thousandths). The individual properties are known as frações and an owner may have one or more (garages may be separate titles, or combined, for instance).
Where there are more than four owners sharing the building, there must be an official condominium setup, with an adminstrator (an owner, or a third party) and regulations (which, once established, are extremely hard to change). The way everything must function, including meetings, voting, financial reserves, is established clearly by law, and the regulations complement but cannot override that.
However, a key factor to check is the financial health of the condominium, and the historical maintenance. If you buy into a condominium which is underfunded and/or poorly maintained, you share the headache of getting it sorted. Many condominiums are well run and solvent; some are effectively bankrupt, with no money to fund, say, a roof problem. There is no landlord - it's down to the joint ownership to fund the building in the established proportions. This is precisely the kind of thing the lawyer should check for you.
The alternative to propriedade horizontal is propriedade vertical, where one owner owns the whole building (even if it has separately rented units within it). It is possible for the status to be changed between these two - but that's beyond the scope of this thread!