Actually, there's quite a lot of history in various parts of the world when parts of a political entity split off. Sometimes this is done peacefully, sometimes it involves serious fighting and wars. An interesting recent case was in Switzerland, where in 1978 the Canton of Bern split, with the northern part forming the new Canton of Jura. You can read a lot about it online, including a couple of wikipedia articles. It's fairly well encoded in Swiss law, where similar votes happen every few years, typically involving a municipality with a large population that wants to secede from its canton and join another. The typical reason for such splits is as in Scotland, where the people in an area feel poorly served by the government, and think they can do better as part of a different county/state/whatever, or perhaps as an independent unit as Jura did.
Here in the US, we had a similar vote in 1863, which resulted in the new state of West Virginia being formed. This is often presented as part of the Civil War split off of the Confederacy. Historians tend to interpret it as more of a case of the western population feeling poorly treated by the remote state government in Richmond, which collect taxes in the mountains, but provided few government services in return. West Virginia did apply to the federal government for statehood, which was ratified after a few years. Unlike the Southern secession, this was done without (further) warfare. A funny aspect of the story is that now, several counties in the northeast of West Virginia have openly discussed seceding and joining either Virginia or Maryland, for pretty much the same reasons. Unlike Switzerland, though, the US doesn't have much in the way of official laws that deal with such political reorganization and redrawing of political boundaries.
The story in Scotland may work out as it often does in Switzerland, where many of the votes for secession fail. The reason is that the referendum functions as a "wake-up call" to the government. It's typical for a lot of public discussion to happen, and the government(s) make promises to fix the problems that triggered the referendum. Sometimes, as people have suggested here, the government reneges on its promises. This will be followed by another vote a few years later, which will often succeed. Or the government may fix many of the problems, which will satisfy the voters and repeated votes will fail.
The Scots would probably do well to continue discussing the issues publicly, and keep the London government aware that they can't continue to get away with everything without repercussions.