The U.S. Constitution has two different privilege and immunities clauses; the first is located in Article IV, and the second is in the 14th Amendment. The first declares that the officials of any state cannot discriminate against out-of-state citizens, whereas the second states that no state law can abridge the rights of any citizen of the United States.
The first privileges and immunities clause was inspired by a similar point in the Articles of Confederation, the document that preceded the U.S. Constitution, and was designed to promote interstate travel and trade in the newly formed republic. However, despite its seemingly open phrasing, this clause has been narrowly interpreted by the Supreme Court over time as to what rights it actually protects. For example, an individual state may not impose one sales tax on its citizens and another, higher one on visitors, but it may charge a higher tuition rate for out-of-state residents to attend its universities.
The second privileges and immunities clause focuses more explicitly on the composition of laws themselves. During the Civil War and Reconstruction eras, many lawmakers feared that the abolition of slavery might be practically reversed if states could still craft laws undermining new African-American freedoms, such as those manifested in the Jim Crow era. This clause was intended as another protection reflective of the 14 Amendment's equal protections guarantee.