I could write an expository essay on this topic, but I won't. I'll just try to summarize.

A Condo is basically any individual-owned (e.g. you can buy it) premise within a communal property (e.g. a multi-family dwelling). One of the defining characteristics of a Condo is that owners of Condos within a building pay monthly or quarterly fees to help cover maintenance of the building, grounds, and common areas outside their premise and are fully responsible for the inside of their premise. In other words, with a condo, you have to hire a plumber to fix your sink on your own, you have equity and can get a mortgage to buy it because you own the premise you live in, but you still have to pay additional monthly fees for shared maintenance of things like landscaping outside, parking areas, building exterior, and common areas like a pool or gym.

An Apartment is basically any communally or developer-owned premise within a communal property (e.g. a multi-family dwelling). The defining characteristic of an Apartment is that you pay a single monthly amount (maybe split by line items) which includes rent for the premise you have possession of, as well as maintenance for that premise which is handled by the owner of the Apartment (not you), and any communal maintenance. Most apartments in the US are developer-owned, but there are some which are communally owned, e.g. all renters are also investors into a community association which in turn owns the building (e.g. like a coop), however the communal rather than individual nature of ownership ensures this is still an Apartment and not a Condo under US definitions.

This isn't entirely uniquely American, but it's pretty much so. Outside of the US, there is usually less distinction in ownership structure and any premise within a multi-family dwelling is generically referred to as a flat, unless it's a fully open floor plan in which its called a loft. In the US, a loft is specifically an open floor plan dwelling with an open second-floor area (the loft is the upstairs), a single floor open floor plan is called a studio, and both lofts and studios in the US are subsets of apartments or condos.

More importantly, while it is somewhat commonplace for condos to "age out" and end up as apartments in the US (this is a called a "condo conversion"), you very rarely see apartments become condos. That is, as a building ages and decreases in value or maintenance costs become untenable to individual residents, someone may buy up multiple units until they own the building, and then convert it to apartments. In some condos, individual owners may buy and then rent out individual units to tenants as an investment as well, which when done by a business entity is a form of condo conversion. The major reason why this happens pretty much only in one direction is that apartments and condos tend to be constructed differently in the US. Nearly by definition, condos are considered luxury properties, and are built to last a long time with a high degree of privacy for residents, which means the buildings use a lot of construction techniques from concrete or other long-lasting materials and have thicker fully insulated walls between units. Apartments in the US generally are constructed as cheaply as possible and so that it's easy for them to be "turned" between tenants, which preferences drywall on stick-frame construction, meaning interior walls between units are thinner and less sound insulating, although exterior facades might be stone, brick, or concrete to reduce maintenance.

Generally, the term "condo" can refer to an individual unit or the building, and "apartment" only refers to the individual unit, and the building would be referred to with the suffix "building" or "complex" for a multi-building development. Condos generally are not developed as complexes, but as single buildings, and typically are on higher-value real estate locations (city centers).