At this point, we do not know if there is a possible way for a single city to be granted independence and, essentially, become a Kingdom consisting of only a few counties (A City State is not just the city, it's the city and its immediately dependent territories...so all the little farming villages near the city). Or for a Kingdom to truly dissolve and fall apart.
Likewise, we don't know if it is possible to go conquer a City and declare it independent....or to go establish a town in unclaimed land (not likely to exist at game launch, would have to be on a new, unsettled continent).
However, this is a very convoluted and complicated means by which this could happen, with the currently known mechanics. It is, however, extraordinarily unlikely.
What you'd need to do is be a King (however you got there), then have all of your Dukes declare Casus Belli against you, but set up their own kingdom instead of conquering yours. This leaves you as a King with only a single Duchy to rule. Then, have all of your Counts (except the ones you want to keep) declare Casus Belli against you the same way. This leaves you as a King over a handful of Counties....maybe even only one. Tada! You're a City-State! And will be conquered in a few weeks, most likely.
There may be other mechanics that permit this possibility, as mentioned at the start of this post...but given what we currently have, what I listed is basically the only known way to accomplish it.