Suppose Air Canada flies from Vancouver to Santiago with a stop in LAX. I am vaguely of the belief that they are not allowed to pickup Americans who wish to travel from LAX to Santiago, but I'm curious to know more about these rules (if they exist). Also, how they apply (or not) internationally, ie. not just in America.
The short answer to your first question is that an airline can pick up passengers at an intermediate stop as long as it's previously been agreed by all the countries involved (see below). One example is Singapore Airlines SQ12, which flies SIN-NRT-LAX; many passengers leave and board the aircraft in Tokyo.
More generally, these rules are known as the freedoms of the air but they aren't consistently or fully implemented everywhere and a lot depends on agreements between individual countries. Your first question is about the fifth freedom:
the right to fly between two foreign countries on a flight originating or ending in one's own country
As Wikipedia describes, this isn't always straightforward:
The negotiations for fifth freedom traffic rights can be lengthy because in practice the approval of at least three different nations is required
If an airline stops in an intermediate country to refuel or for other technical reasons but isn't allowed to board or deplane customers, that would be the second freedom:
the right to refuel or carry out maintenance in a foreign country without embarking or disembarking passengers or cargo
Another important consideration is each planned OR potential stop for the aircraft (potential meaning a diversion or extra stop for fuel, maintenance, weather or passenger issues such as illness). Any passenger boarding an international flight must have all the appropriate documentation for both entry AND exit for stops even if they are to remain aboard while some other passengers enplane or deplane. The reason is, so that a person is not arrived physically in a destination they have no proper credentials for (EX: a VISA or passport or both)