If you plan to sell the entire apartment, it is possible only with the participation of all co-owners. If one refuses to make a deal, it will be impossible to sell the building.
However, if the share of one of the co-owners is not significant, this issue can be resolved through the court.
If you have a clearly allocated share of the building (for example ½), then you can sell it by notifying the co-owner in writing, since he has a priority right to buy it.