Saul Kripke died last week (September 15), so there have been various obituaries slowly coming out. One of his major contributions was laying the foundations of possible world semantics, it's unsurprising that the obituaries and tributes make an attempt to explain the concept of a possible world to a lay audience. Unfortunately, they often make elementary mistakes in doing so. I don't intend this particularly as a criticism, since I think this is very easy to do when trying to explain things for those who are not familiar with them already; and, in addition, since analytic philosophers often don't read up on the history of the concepts they use, it's easy for mutations to develop and errors to propagate even among professional philosophers. Some of these are relatively harmless, but with respect to possible worlds, I think one error in particular has a tendency to cause no end of confusion. It is, more or less, this. A possible world, the error goes, helps us explain possibility statements by thinking in terms of other worlds; for instance, if you didn't eat breakfast, we can cash out the statement that you could have eaten breakfast by thinking of you as eating breakfast in another world. This is precisely how Kripke held we were not to think of possible worlds; in later times, reflecting on the confusion that this error caused, he wondered if he should have used a different phrase, like 'counterfactual situation'. Thus it seems reasonable to put up a very, very elementary guide to how possible world semantics is supposed to work.
We can start how Kripke would, with something that is familiar to most people with a basic mathematics education. If we talk about probabilities, we can do so in terms of what are sometimes known as microstates, particular configurations. For instance, a regular die has six microstates, depending on whether 1, 2, 3, 4, 5, or 6 come up. Since nothing differentiates the numbers on the face of the die, in a well-made die, each of these is equiprobable, and thus each has a 1/6 probability of being the result of a given roll of the die. 'Possible world' is just a generalization of this idea for cases in which we are more interested in possibilities than probabilities.
If we stick with our single die, we can think of each possible result of a roll as represented by a list of yes/no questions with their answers. For instance, the result in which one pip comes up could be represented as:
Does 1 come up on the die? Yes
Does 2 come up on the die? No
Does 3 come up on the die? No
Does 4 come up on the die? No
Does 5 come up on the die? No
Does 6 come up on the die? No
If nothing whatsoever exists or is relevant to the situation except the faces of the die, such a list specifies a possible world: a possible world is a logical object associated with a consistent list of yes/no questions with yes or no answers, which we can compare with similar logical objects. In this case we are interpreting the possible world as a roll of a die. If there were only two dice, and nothing else were relevant at all, we could capture the possibilities with lists that would cover all the new possibilities. For instance, this would be the list for the possible world for snake eyes:
Does 1 come up on die 1? Yes
Does 2 come up on die 1? No
Does 3 come up on die 1? No
Does 4 come up on die 1? No
Does 5 come up on die 1? No
Does 6 come up on die 1? No
Does 1 come up on die 2? Yes
Does 2 come up on die 2? No
Does 3 come up on die 2? No
Does 4 come up on die 2? No
Does 5 come up on die 2? No
We can even specify possibilities that have no well-defined probability. One of St. Olaf's miracles was rolling a 13 with two regular six-sided dice because one of the dice split in the middle of the roll. The possible world for St. Olaf's miracle roll, assuming that we call the die that actually split 'die 2', is described by the following list:
Does 1 come up on die 1? No
Does 2 come up on die 1? No
Does 3 come up on die 1? No
Does 4 come up on die 1? No
Does 5 come up on die 1? No
Does 6 come up on die 1? Yes
Does 1 come up on die 2? Yes
Does 2 come up on die 2? No
Does 3 come up on die 2? No
Does 4 come up on die 2? No
Does 5 come up on die 2? No
Does 6 come up on die 2? Yes
I said above that a possible world is a logical object associated with a consistent list of yes/no questions with their answers; the St. Olaf's miracle list is only consistent if we allow die-splitting to be relevant and possible, and even if we do, there are going to be question-answer lists that are not consistent -- they would require kinds of splitting that are not relevant or possible. Such lists designate, as you might expect, impossible worlds. Impossible worlds can be tricky to use; we will stick with possible worlds, that is, with cases designated by lists whose answers are all consistent with each other.
When we are talking about possible and necessary things, however, we usually want to handle more complicated things than dice rolls. Thus 'possible world' is usually reserved for cases in which our list of questions and answers are not just consistent but in some way complete, in the sense that they cover everything. This introduces additional complications; it means that we can't actually study each individual possible world by looking through all the items on its associated list, because we can't read through a list that covers everything. We need to handle these complicated cases in another way. The key is in another aspect of the description of possible worlds that we gave: possible worlds are things that can be compared with each other. That is, one possible world can be related to other possible worlds.
In principle, you could have all sorts of complicated and weird relations among possible worlds, but the relations in which we are particularly interested are binary relations, that is, relations that relate one particular possible world to another possible world by linking up their answers in some way. This is known as an accessibility relation: an accessibility relation is a binary relation between possible worlds that captures how the answers in the list for one possible world are related to the answers in the list for another possible world. Basically, what we're trying to do with accessibility relations is make sense of the fact that what we say about one situation may depend on what we say about another situation. For instance, I might interpret the possible worlds as moments in time and the list describing one includes the question and answer: "Is it 3:00 pm on Thursday, September 22, 2022? Yes." Then we would expect that it would also include things like, "When one minute passes, will it be 3:01 pm on Thursday, September 22, 2022? Yes." But the next minute also has its own list. On that list, both of those questions are answered with "No", but "Is it 3:01 pm on Thursday, September 22, 2022?" is answered with "Yes". The lists of the two times are related to each other, and the question & answer on the first, "When one minute passes, will it be 3:01 om on Thursday, September 22, 2022? Yes" tells us that that is the case. Therefore, the second moment is 'accessible' from the first, if we are talking about a relation of one moment being a minute in the future of another moment. The list describing one tells us a little bit about the list describing the other; they are linked by an accessibility relation.
With possible worlds and accessibility relations, we can define what are known as modal operators. Modal operators are the logical elements in the list-items that tell us about items on other lists. When dealing with times, for instance, 'at some point in the past', 'a minute in the future', 'at every point in the past', etc., are all modal operators. For instance 'at every point in the past, X' on a list for a possible world (call it W) tells us that if there are possible worlds accessible from W in the sense that their lists describe moments in the past for W, all of them have X (whatever X is) on their lists. There are many different kinds of modal operators; 'it is possible that X' (whatever X is) and 'it is necessary that X' (whatever X is) are common ones, for instance. And whenever we have a statement with a modal operator, we can translate it into discussion with possible worlds and accessibility relations. One reason you might do this is to see how one modal operator is related to another. There are many interesting kinds of research done in modal logic that look into the question of what kinds of accessibility relations go with what kinds of modal operators, and with that information you can learn a lot about how a modal operator works and its similarities and differences when compared to other modal operators. Another reason you might want to talk about possible worlds and accessibility relations rather than modal operators is that many modal operators are blunt instruments; they don't pick out particular alternatives, they just talk about them in a general way, and sometimes we want to talk about particular alternatives. There are other uses of possible world semantics, but these are probably the most common.
Those are the basics. Note that a possible world doesn't, strictly speaking, have to be a 'world'; that's just a figure of speech, although your lists could describe worlds. There are a few additional complications that are worth noting, although they aren't necessary for the basics. I already noted impossible worlds above. There are situations where using possible worlds can get very complicated but if you allow yourself to use impossible worlds as well, you can simplify things a lot. Not everyone likes using them, though, and they are sometimes hard to interpret and relate to each other. Another complication is that people often assume that the list of questions for each possible world is always exactly the same. This is not strictly necessary, and there are times when you wouldn't want to make that assumption, but it simplifies things, so people often assume it. Another point worth noting is that, while I described the lists as being lists of yes/no questions linked with their answers, the more common way it is done is by describing them as lists of propositions linked with their truth values. For instance, instead of "Does 1 come up on die 1? Yes", the item on the list would be thought of as being, "1 comes up on die 1. True." But the two ways of talking (yes/no answers to questions and true/false evaluations of statements) are logically equivalent, so you can pick the one that you find easiest to use.