In some AI applications we would like to be able to reason about the beliefs of several different agents. The most natural way to express this would be using statements like:
pink(clyde)
believe(fred, pink(clyde))
believe(joe, pink(clyde))
believe(joe, believe(fred, pink(clyde)))
In other words, Clyde is pink, Fred believes he's pink, Joe, reasonably enough believes he's not pink, but thinks that fred (erroneously) believes Clyde's pink.
This might look like it can be expressed in predicate logic - but no (or at least, not in a useful way). Remember that in predicate logic arguments to predicates could be constants, variables, or function expressions. But here we really want the arguments to be predicates themselves, and to be able to get at, manipulate and reason about those predicates, maybe with rules like ``if X believes P Q and X believes P then X believes Q''.
One way of representing such things is to use modal logic. In modal logic, the semantics of expressions is defined in terms of the truth of things in different worlds or contexts. This contrasts with predicate logic, where things are just true or false, not true in one context and false in another. Anyway, in modal logic believe(X,P) means that P is true in a particular world - that designating the things X believes are true. Modal logics give a sound semantics to such expressions, and allow us to reason about facts that are believed true by one agent and false by another.
Modal logics are also useful for various other things, such as representing facts that depend on time (e.g., with past, present, and future worlds), and facts that are just possible (possible worlds). As usual, we have no time to go into such things in detail - we'd need a whole course to do justice to logic. But you should at least be aware of the existence of logics other than first order predicate logic, and preferably have some idea why they are needed.
If you are confused at this point, you are in good company. Very few people have a thorough understanding of logic. The main points to remember are: