Certain types of flats can be defined as HMOs and the definitions are found in the Housing Act 2004:
A purpose built block of flats is not an HMO.
However, an individual flat within it might be if it is let to 3 or more tenants (at least one of whom is unrelated). The flat will not be subject to mandatory licensing but could be subject to additional licensing if the local authority chooses to introduce a scheme locally.
If the block is a house which has been converted entirely into self-contained flats the conversion will be regarded by local housing authorities as an HMO if it does not comply at least with the standards of the 1991 Building Regulations and if more than one third of the flats are let out on short leases. These blocks of flats will not be subject to mandatory HMO licensing although the local housing authority may introduce additional licensing to cover them.