The difference between a condominium and an apartment complex is purely legal: there is no way to know a condominium from an apartment simply by looking at or visiting the building.
What defines a condominium is the form of ownership. The same building developed as a condominium (and sold in individual units to different owners) could actually be built someplace else as an apartment building (the developers would retain ownership and rent individual units to different tenants). As a practical matter, though, builders tend to build condominiums to higher quality standards than apartment complexes because of the differences between the rental and sale markets.
Technically, a condominium is a collection of individual home units and common areas along with the land upon which they sit. Individual home ownership within a condominium is construed as ownership of only the air space confining the boundaries of the home (Anglo-Saxon law systems; different elsewhere). The boundaries of that space are specified by a legal document known as a Declaration, filed of record with the local governing authority. Typically these boundaries will include the drywall surrounding a room, allowing the homeowner to make some interior modifications without impacting the common area. Anything outside this boundary is held in an undivided ownership interest by a corporation established at the time of the condominium’s creation. The corporation holds this property in trust on behalf of the homeowners as a group–-it may not have ownership itself.
Condominiums have conditions, covenants, and restrictions, and often additional rules, that govern how the individual unit owners are to share the space.
It is also possible for a condominium to consist of single family dwellings: so-called “detached condominiums” where homeowners do not maintain the exteriors of the dwellings, yards, etc. or “site condominiums” where the owner has more control and possible ownership (as in a “whole lot” or “lot line” condominium) over the exterior appearance. These structures are preferred by some planned neighborhoods and gated communities.