It's based on relays, and probably there's (or can be) some influence at the client level. Your client (Primal, Damus, etc) connects to the relays that are listed in your profile, the client requests the notes from the relays and orders the information by the time it was posted. When you post a note, the client signs it and sends it to all the relays listed in the profile. afaik