There's no part in the Constitution that specifically prevents secession. However, the authority of who may decide if a territory may join the union is found in the Constitution in Article IV, Section 3, Clause 1:
New States may be admitted by the Congress into this Union; but no new State shall be formed or erected within the Jurisdiction of any other State; nor any State be formed by the Junction of two or more States, or Parts of States, without the Consent of the Legislatures of the States concerned as well as of the Congress.
This should be the same or similar procedure for a state to leave the union. In regard to Puerto Rico, they hold a plebiscite every 10 or so years regarding status. Each time they do, statehood gains more and more votes. So far, it hasn't gained a majority, however. Once it does, then the government of Puerto Rico will petition the Congress for inclusion in the union as a state under the authority of
Article IV, Section 3, Clause 1.
I would imagine, that if a state had a vote of its citizens to leave the union, and Congress had a vote approving it, the state would be out of the union. Although, if there were certain counties that voted to stay in the union, they may could petition to be annexed by an adjacent state and by doing so stay within the United States. Regardless, it would be a serious mess.