It varies with the client device. Some are better than others (at least at making the sensible choice of AP as seen by humans managing the system) so the methods obviously vary.
In general, a sensible approach evaluates the signal and signal to noise ratio of the available APs and picks the one with the best signal to noise. I believe that most devices do manage this correctly on radio startup.
An approach which more than one manufacturer seems overly prone to (though a certain fruit-themed manufacturer is notorious for) is to cling to the first AP it sees until it just can't get that any more. Owners of these devices should learn to use a brief trip into airplane mode to try and shake this behavior.
UniFi only "moves devices to a better AP" on the Still in Beta Zero Homing feature, which comes with the downside of everything on one channel and no open networks (and IMHO the other downside of needing to use a V3.x.x controller, when 2.4.6 is still the most stable version of the UniFi controller software.) There is a different feature (MinRSSI) that also requires 3.x.x but does not require everything on one channel and can work with open networks which provides soft disconnect notices to try and urge clients to a different AP when their signal to noise as seen by the AP gets too low. The devices most likely to ignore that appear to be the same devices most prone to hanging onto the first AP they see, from reports.
In many cases one part of the best approach to getting better behavior from clients is to turn AP power down, at least where APs are closely spaced. This, evidently, does not come naturally to most people.
Depends on make/model of card/router but in most cases there is no in built system to pick an SSID for signal strength etc. Unifi AP's move you to another AP when another becomes closer. – JohnnyVegas – 2014-11-24T18:42:44.590
OK, but it must pick one somehow, so there have to be some rules for this, even if they are "pick one randomly". I'd like to understand what those rules are. – EM0 – 2014-11-24T18:56:37.727
I don't know of anything involved. If there were two identically configured access points with same ssid/security the same distance from the client, they would connect in the order that they have previously been connected, or interfere with each other to the point that neither connects - I really don't think there is any other criteria that it can go on. – JohnnyVegas – 2014-11-25T00:23:11.187