The National Popular Vote Compact would operate in a manner identical to the system that has been used for over 200 years in the 18 states that do not have laws requiring presidential electors to vote a certain way. In these 18 states (which currently use the state-by-state winner-take-all method of awarding electoral votes), the presidential electors are nominated (in various ways -- typically by a party conventions at the district or state level) by the political party whose presidential candidate receives the most popular votes inside the state. The National Popular Vote Compact would operate in the same way, except the presidential electors would be the persons nominated by the political party whose presidential candidate receives the most popular votes in all 50 states and the District of Columbia.
There is no law! It is a proposed interstate compact that will never go into effect if no Red States become apart of it.