There have many different attempts to interpret Anselm's 'ontological argument'. In what follows I will give an interepretation that is influenced by the interpretation of Gyula Klima. It is important to note that what I say will be focused entirely on the Anselmian family of ontological arguments, which have their roots in an Augustinian perspective and derive mainly from Anselm's Proslogion. There is another family, deriving from Descartes's Meditations on First Philosophy (Meditation V), which are discussed by a number of major early modern thinkers (including Kant, who coined the label 'ontological argument'). The Cartesian family of ontological arguments should not be confused with the Anselmian; they are formulated in different terms, they have a different history, and they raise, to a significant extent, different issues. For the purposes of this post, I will set the Cartesian family aside entirely. The difference between the two families should be kept in mind, however, because the objections to ontological arguments that are most common were formulated with the Cartesian family of arguments in mind.
The ontological argument is usually treated as an argument for God's existence, but it is worth noting that Anselm himself doesn't put it in quite that light. The work in which we find the argument, the Proslogion , is structured as a contemplative prayer to God, asking for understanding of what the Contemplator already believes. In the course of this prayer, the Contemplator notes that we (i.e., Christians) believe that God is that than which no greater can be thought. But this immediately raises an issue: Some people might deny that there is any such thing as that than which no greater can be thought (I'll keep italicizing it to help make this post more readable). Anselm refers to the saying in the Psalms: "The fool says in his heart, There is no God."
So Anselm's argument is an argument for God's existence. It arises, however, primarily because Anselm, as a Christian, believes that God exists; and, also as a Christian, that God is that than which no greater can be thought. What the ontological argument is, then, is a response to someone who denies God exists because he denies that there is anything than which no greater can be thought. This context, which is usually ignored, is important for understanding the argument. To the person who makes such a denial, Anselm responds by saying that such a person (Anselm, in keeping with the verse he quoted, calls him the Fool) nonetheless understands what is meant when Anselm says "that than which no greater can be thought," even if he thinks it does not exist. After all, the Fool just denied that there was any such thing as that than which no greater can be thought; presumably he knew what it was that he was saying didn't exist. So even the Fool must admit that that than which no greater can be thought exists in thought; this is presupposed by the fact that he denied that it (namely, his object of thought when he thinks of that than which no greater can be thought) exists.
On the basis of this, Anselm argues that that than which no greater can be thought cannot only exist in thought; for if it did, we could think of something greater than it: if that than which no greater can be thought existed in reality, it would be greater than that than which no greater can be thought if it exists only in thought. From this it is a simple step to show that in saying "That than which no greater can be thought exists only in thought" the Fool would contradict himself. So that than which no greater can be thought exists in reality, not just in thought.
What is more, Anselm goes on to say, it exists in reality in such a way that it cannot consistently be thought of as not existing in reality; because we can think of something that cannot consistently be thought of as not existing in reality. And one can show, in a way similar to the way Anselm has already shown that that than which no greater can be thought exists in reality, that that than which no greater can be thought cannot consistently be thought not to exist. I use the word 'consistently' here, because Anselm recognizes that there must be some sense in which the Fool is thinking of that than which no greater can be thought as non-existent. As he asks,
Why therefore did the fool say in his heart "there is no God," since it is so evident to any rational mind that you above all things exist? Why indeed, except precisely because he is stupid and foolish?
Fortunately he doesn't leave it at that, but goes on to say that we can think something either by thinking the relevant words, or by thinking the thing that is understood. The Fool thinks the words, "That than which no greater can be thought does not exist," but does not bother with understanding what is supposed to be understood by them. He is, in short, in the same boat as someone who thinks, "There could be an even number that is not a multiple of two." The words are thought, but what is thought about is not understood. So, in other words, the Fool either understands what he says does not exist, in which case he contradicts himself, or he does not contradict himself because he does not understand what he is saying does not exist. As Anselm says, "Even though he may say those words in his heart he will give them some other meaning or no meaning at all."
So what is to be made of this? I myself take Klima's view that the argument is sound. However, most of what I will say here does not require agreeing with me on this point. All it requires is that we ask, "Even supposing it is sound, what then?"
A sound argument is one that is logically valid and has true premises. But not all sound arguments are particularly helpful for coming to a conclusion. For instance, it is fairly easy to create arguments that are sound but that beg the question -- that is, arguments that are logically valid and have true premises, but whose premises can only be known to be true if we already accept the conclusion. When our interest is persuasion, the discovery of the truth, or anything else that relies on going from the unknown to the known or from the not-believed to the believed, we need something more than soundness. Klima argues, and I think that he's right, that the problem Anselm's argument faces is precisely at this level. Despite the fact that it is a sound argument, and shows that the atheist (the one who denies there is a God because that than which no greater can be thought does not exist) would be contradicting himself if he were seriously to reflect on that than which no greater can be thought, nonetheless it's possible to rationally reject the argument. As Anselm himself recognizes, understanding the words "that than which no greater can be thought" is not the same as having that than which no greater can be thought as an object of the understanding. As Klima says,
...the mere linguistic understanding of a description simply never entails commitment to thinking of something as that to which the description applies, whether in reality, or at least in one's own mind. We can always accept other people's descriptions of objects they think of with the tacit proviso that whatever they think of as such may not in fact be such, for they may be mistaken, or deliberately misleading, or just simply making something up for entertainment, without the intent to be "taken seriously", that is, without the intent to have us believe that their descriptions applied to anything.
Thus, the persuasive force of the argument, even considered as sound, depends crucially on how far the person is willing to go in taking that than which no greater can be thought seriously; and this is something only serious reflection can bring about. Klima suggests elsewhere, with some plausibility, that this is the basis for Aquinas's famous denial of the claim that Anselm's argument proves that God's existence is self-evident. Theists and atheists are simply not in the same position with regard to the topic of discussion, even if we suppose the argument sound. Believers, thinking of God as that than which no greater can be thought, cannot think of God as not existing without contradiction. Atheists, however, almost never really think of God as that than which no greater can be thought; they merely recognize that believers use those words, or words like them, to describe the object of their belief. Thus, the atheist is usually not being inconsistent, because he doesn't actually have that than which no greater can be thought in mind; when he thinks about it, he thinks of it as something in the believer's mind. As Klima says,
So Anselm's description will not provide the atheist with a logical shortcut to a proper concept of God. The lesson we can learn from Aquinas' natural theology is that this concept has to be built up in a human mind gradually, on the basis of one's already existing concepts and existing commitments, for otherwise its proper object will never get integrated into the "universe" of proper thought objects of this mind, but will be acknowledged only by way of parasitic reference, as belonging to the "universe" of others.
This whole point brings up some interesting questions. For instance, how does one begin to go about showing the atheist how to think - really think - of God as that than which no greater can be thought? Perhaps more immediately, it brings up a general issue that always plays an important role in discussions between atheists and Christians, even when it isn't recognized to do so: to what extent are atheists and Christians really thinking of the same thing when they (verbally) contradict each other? How does one go about showing the atheist the Christian point of view in such a way that the atheist understands it, itself, rather than understanding it as what-the-Christian-believes? Without an answer to these questions, it seems to me that the ontological argument is useless for apologetic purposes. On the other hand, its raising these issues is itself perhaps the greatest value of the ontological argument for apologetics.