This sutta takes place near the town of Nālandā1, in a mango grove which was owned by a man named Pāvārika. Here, the Buddha was approached by a man named Kevatta ("Fisherman"), who bowed and sat to his side. "Sir," the man said, "the town of Nālandā is great, filled with prosperity and people who have faith in you! However, if you were to instruct your monks to perform miracles in public, how many more people would be inspired to become faithful! Wouldn't that be a good idea?" The Buddha rejected him outright. "No, Kevatta. I will not have my monks perform tricks for a crowd." Kevatta insists two more times, and finally the Buddha addresses him in detail.
"Kevatta, there are three types of miracles I speak about, having realized them through the power of my own insight. First, there is the miracle of psychic power (iddhi-pātihāriya). Second, there is the miracle of telepathy (ādesanā-pātihāriya). Thirdly, there is the miracle of teaching (anusāsani-pātihāriya).
"With the miracle of psychic power, a monk can perform a number of different feats - he may multiply himself, then make the duplicate bodies disappear; he may pass through walls or mountains as if they were thin air; he may dive into the ground as if it were water, or walk on water as if it were solid ground; he may sit cross-legged and fly through the air; he may reach out and touch the sun and the moon; he may project his body as far as the realm of Brahmā.
"A faithful person may see a monk perform these feats, and excitedly relate what they saw to someone who has no faith. That faithless person may dismiss the monk's attainments, saying, "Oh, that? It has nothing to do with insight. That's just a magical spell called 'Gandhāri.2' That's why we don't bother making showy displays of miracles, Kevatta. Truthfully, I despise such things."
"With the miracle of telepathy, a monk is able to know the state of another's mind, or read their thoughts. Likewise, someone with faith may witness these feats, and tell someone without faith, who might dismiss the account, saying 'Oh, that? It has nothing to do with insight. That's just a magical spell called 'Mānikā.'3 That's why we don't bother making showy displays of miracles, Kevatta. Truthfully, I despise such things."
"Kevatta, if we must speak of miracles, let us speak of the miracle of teaching. This is when a monk teaches someone how to direct their mind, and instructs them in what states should be abandonded, as well as those which should be cultivated." Here, the sutta presents the Sīlakkhandhavagga Pericope in its entirety. "This," the Buddha concluded, "is the miracle of teaching. I am personally capable of all three sorts - yet it is only the miracle of teaching which I do not despise."
"Kevatta, let me tell you about a monk from my order who was capable of performing the miracle of psychic power. One day, he asked himself, 'In what world do these four great elements, which make up this body, cease to exist?'"
Here, we may assume that the monk was ignorantly seeking to escape suffering by transcending beyond the woes of the physical, material body. This would be a sort of gnostic goal, common in some traditions of the Buddha's time. Such beliefs are rejected in Buddhism as misguided, since the material body is not directly responsible for dukkha - it is merely a product of dependent origination. The cycle of dependent origination is not brought to an end with the attainment of an immaterial body, but through the destruction of the corruptions and the attainment of nibbāna.
"This monk sought an answer in the heavenly realms. Using the power of his mind, he entered the worlds of the gods." Here, the sutta lists many progressive cosmological levels which the monk is said to have visited. In each, our monk consulted the deities which inhabit that particular realm, and asked them his question about where the material elements which make up the body cease to exist. However, no god is able to answer his question, and each one merely sends him one step up the "ladder" of deity ranks.4 This repeats all the way up until the monk is sent to the Great Brahmā, a deluded god who imagines himself to be the omnipotent creator of the universe.5
"Three separate times, this monk asked the Great Brahmā, 'In what world do these four great elements, which make up this body, cease to exist?' Each time, the Great Brahmā hesitated, saying only, 'I am the Great Brahmā, the Creator, the First, the All-Father!' This puzzled the monk, and each time, he responded, 'That's very well, but I'm not asking about you - can't you answer my question?'"
"Finally, the Great Brahmā took the monk by the arm and pulled him to the side. 'Monk,' the god said, 'these gods that reside here believe I am omnipotent, and that there is no knowledge which is beyond me. I cannot address your question in front of them, because honestly, I do not know the know the answer.'" It's worth pointing out here that the Great Brahmā is still understood as existing in the form sphere, not having attained the formless attainments necessary to contact the formless spheres. "Monk," the god continued, "it was foolish for you to wander the heavenly realms searching for an answer to this question. You should return to the Lord of your order, the Buddha, and ask him. Take his word on this issue."
"So, Kevatta, this monk returned to this earthly realm, prostrated himself before me, and asked me his question." The point of this story seems to be that the monk's psychic ability to travel to the realms of the gods ultimately proved to be useless. Again, the true miracle is being able to learn the Buddha's teaching.
The Buddha continued, "I began by telling that monk a story. 'Once upon a time, a group of sea-faring merchants set sail, bringing with them a bird which was trained to spot land on the horizon. It would fly off, in all directions, and if it spotted land, it would go and remain there. If it saw nothing, it would return to the sailors. Just so, monk, you have flown to the heavenly realms, wandering this way and that, only to find nothing and return here to me.'
'Monk, let me instruct you now - the very premise of your question is flawed. Instead, you should ask in this way:
Where do water and earth,
Fire and water find no footing?
Where is it that long and short,
Beauty and ugliness,
Mind-and-matter cease completely?
Asked in this way, I answer:
Where consciousness is without attributes,
Where it is infinite,
And where it is luminous
Is where water and earth,
Fire and water find no footing.
There, long and short
Beauty and ugliness,
Mind-and-matter (or: name-and-form) cease completely.
With the cessation of consciousness,
All of this is destroyed."
Let's stop here, because this verse is a source of much confusion. Bhikku Bodhi points out that it has "been a perennial challenge to Buddhist scholarship." Walshe quotes G.C. Pandhe, who declared that this verse is primarily inserted here for the sake of concluding with a poem, and that ultimately the meaning of the lines is irrelevant. I disagree.
One source of confusion is the obscurity of the Pali terms used in the verse, particularly "anidassana," the word which corresponds to "without attributes" in the lines above. Thanissaro Bhikku points out that the term, when applied to the idea of "consciousness," is nowhere defined in the canon, despite appearing in multiple places. Ultimately, he recommends setting aside the issue entirely.
Personally, there are two interpretations of this verse which I find valuable, even if their conclusions are different. I will do my best to present them here. Sujato, whose writing on this issue can be read here, points out that some people interpret the Pali phrase "viññāṇāṁ anidassanaṁ anantaṁ sabbato pabhaṁ," (which he translates as "Consciousness non-manifest, infinite, radiant all around") as being an epithet for nibbāna. He rejects this emphatically, since consciousness is a conditioned thing, squarely precluding it from being equivalent to enlightenment.
He prefaces his analysis of this verse by reminding us that this is an obscure poem with unclear terminology, and as such, we should not draw any massive inferences about Buddhist doctrine from it if they are not supported by the prose of the suttas. Then, he establishes that this poem is rooted in the context of Brahmin philosophy. This likely would have been obvious to the intended audience of the verse, something which we can easily overlook thousands of years later. The basic idea rests on the idea that the knowledge of Great Brahmā extends as far as what can be experienced in the first jhāna, but the Buddha knows what lies beyond that - most immediately, the form of consciousness which can be experienced in the Formless Spheres. Here, in the Formless Spheres, the material elements find no footing, because beings here are born without physical bodies. Again, if we approach this sutta with the preliminary assumption that the monk in this story believed that achieving an immaterial existence was the goal of practice, this all makes sense.
However, the Buddha wants us to go one step further, revaling the ultimate goal in the conclusion to the poem: it is with the cessation of all consciousness, even consciousness associated with immaterial existences, that "all of this" is truly ended.
Venerable Ñānananda, quoted by Walshe and also in this thread, has a different interpretation. He sees this verse, and particularly the phrase "viññāṇaṃ anidassanaṃ," as referring to the released consciousness of an arahant. Elsewhere in the canon, the word anidassano is used in a metaphor describing the sky as something which cannot be used for drawing or making images appear. Nothing can "take hold" in the sky, and likewise, in an enlightened mind, concepts such as "name-and-form" (here meaning that heap of phenomena in Dependent Origination which may be mistaken as an identity or a self) cannot take hold. Nothing can become situated in the mind of an arahant to serve as an attachment - the arahant is totally released from such things once he has overcome the usual process of consciousness dependent on sense-objects.
In either interpretation, the point is ultimately the same: instead of trying to attain a state where material form does not exist, the Buddha wants this monk to become an arahant.
After this confusing poem, the sutta ends with a blunt statement that Kevatta was satisfied with what the Buddha said. It makes no mention of conversion.
The corresponding sutra from the Chinese Canon is Dīrghāgama 24. I do not have access to an English translation of this sutra. I will update this section if I ever get the chance to read it.
 Nālandā was a town near Rājagriha, the capital of Magadha kingdom. It later became the site of Nālandā University, one of the world's earliest monastic acadamies and one of the most important sites in Buddhist history. It served as the training ground for many different sects of Buddhism. The university was destroyed by Muslim invaders around 1200 CE.
 This is a common word in Indian religion and has many different meanings. Walshe notes that, here, it refers to a charm which makes someone invisible when cast.
 Walshe cites the commentary in elaborating that this refers to the "cintāmanī vijjā," of the "jewel of thought charm."
 Even though it's presented without much explanation for the sake of this story about an ignorant monk, this is one of the most detailed looks into Buddhist cosmology given by the suttas. Later traditions explicated on this topic at great length, but things in the sutta are vague and not well-defined, since the Buddha was not concerned with discussing cosmology when it wasn't relevant to whatever sermon he was giving.
If you're interested in the details, the progression in this sutta goes like this:
First, the monk travels to "The Realm of the Gods of the Four Great Kings.
They direct him to ask the Four Great Kings themselves.
They direct him to the Thirty-Three Gods.
They direct him to Lord Sakka.
He directs the monk to the Yāma Gods.
They direct him to Suyāma Devaputta (Walshe notes that Devaputta, here, means "son of the gods," a title indicating he rules a group of lesser gods).
He directs the monk to the gods of the Tusita (Contented) Realm.
They direct him to Santusita Devaputta.
He directs the monk to the Nimmānarati gods (who delight in sense-objects which they create).
They direct him to Sunimmita Devaputta.
He directs the monk to the Paranimmita-Vasavatti gods (who delight in sense-objects which other beings create for them).
They direct him to Vasavatti Devaputta.
He directs the monk to the gods of Brahmā’s retinue.
Finally, these gods instruct the monk to ask the Great Brahmā himself. They tell him that they don't know when he will show up, and he must wait for a great radiant light which would signal his appearance.
The sutta is not clear on which of these gods exist in their own realms, and which share space with another class of deities. Later tradition divides Buddhist cosmology into 31 Planes of Existence, but again, the suttas are more vague, mostly using a threefold division between "the sphere of sense-desire," "the sphere of form," and "the formless sphere." In any case, the monk in this sutta seems to have contacted higher dimensions of the sphere of sense-desire, as well as lower dimensions in the sphere of form. Using the later system of 31 Planes, he traveled from the 5th Plane (the human plane) up to the 14th Plane (the plane of the Great Brahmās), with some of the deities presiding in the same plane together.
 At several points in the canon, the suttas make a point of clowning on the idea of a supreme creator god. For another amusing example, as well as a more detailed look on how this being is understood in Buddhist cosmology, see DN 1.