To present an ideally systematic overview: the bulk of the Constitution applies, on its face, to the construction and operation of the *federal *government. As Polycarp mentions, Art. V. states that the Constitution and federal law promulgated thereunder shall be the supreme law of the land when its provisions conflict with state laws. But the bulk of the language restricting what government could do (that is, for instance, the text of the Bill of Rights) was directed at the federal government, not the states, and it did not apply to the states.
For instance, the federal government could not restrict freedom of speech or assembly. But if a state government wanted to do it, it was pretty much free to do so. Most state constitutions had their own provisions that, as a matter of state law, extended similar protections against state action, but those were rescindable by the states, and applied as broadly or narrowly as the states wished to construe them.
The system changed drastically as a result of the Civil War. The Reconstruction Amendments, in particular the 14th Amendment, explicitly established the primacy of federal law over the states, and it said that states were no longer permitted to deprive persons of life, liberty, or property without due process. (This quoted a similar provision in the 5th Amendment that, like all the Bill of Rights, applied only to the federal government. Now, the states were similarly restrained.) Nor were states permitted to deprive any person of the equal protection of the law (for instance based on their color or past condition of servitude).
As is the case in all matters of Constitutional text, the precise contours of the 14th Amendment were (and are) the subject of debate for the next several decades. But starting in the '20’s, and continuing significantly under the Warren Court of the '50’s and '60’s, the provisions of the Bill of Rights began to be applied to the states via the theory that the Due Process Clause of the 14th Amendment “incorporated” (some of the) particular protections in the Bill. That is, were a state to deprive someone of their right to free speech, it would be by definition depriving them of liberty without due process, something that the Constitution now prohibited states from doing.
Not all rights are incorporated, however. Exactly what rights count and which ones don’t is a case by case determination, and there have been competing theories on the Court over the years as to what tests should be used. But so far, the First, Second, Fourth, most of the Fifth, pretty much all of the Sixth, and part of the Eighth Amendments have been incorporated. (The 9th and 10th A.'s don’t grant specific protections.) The Second was just incorporated in 2010, in the abovementioned McDonald v. Chicago.
The Third Amendment hasn’t come up too often (not much quartering of troops going on these days, although there are some lower-court cases about it). The Fifth Amendment’s grand jury requirement has not been incorporated – states don’t have to provide grand juries. AFAIK, grand juries still exist in all states, but some states have abolished or made them optional for lesser felonies, even though a grand jury would be required were the same crime charged federally.
The big one that’s missing is the 7th Amendment, which mandates the right to a jury trial in civil cases. There’s no requirement that civil litigants be provided a jury trial in a suit filed in state court.
Starting with the Reconstruction Amendments, by the way, most Amendments that have established new civil law protections (for instance, the right of women and 18 year olds to vote) have explicitly applied themselves to the states, and have given the federal government the power to enforce them through appropriate legislation. So the rights newer than the those in the Bill of Rights don’t require incorporation to be binding on the states.
To sum up – states weren’t originally required to abide by the provisions of the Bill of Rights, and the bulk of Constitutional provisions were directed only at the federal government. After the Civil War, when the Union established in blood the proposition that individual states were inferior to the nation as a whole, the 14th Amendment prohibited states from depriving persons of life, liberty, or property without due process. Exactly what that meant was up in the air for a while, but primarily in the middle of the 20th century, the Supreme Court determined that (among other things) some of the protections in the Bill of Rights now applied to the states through the operation of the 14th A.'s Due Process Clause, a process called incorporation. What provisions are incorporated is determined on a case by case basis, a process that is still ongoing, and the bulk of the protections in the Bill of Rights – but not all – have so far been incorporated into the Due Process Clause and are therefore binding on the states.