When asked my profession, I say that I teach philosophy. Sometimes, with equal accuracy, I say that I study philosophy. The form of words is carefully chosen; a certain temerity attaches to the claim to be a philosopher - "I am a philosopher" does not sound as straightforwardly descriptive as "I am a barrister/ soldier/carpenter," for it seems to claim too much. It is almost an honorific, which third parties might apply to someone only if he or she merited it. And such a one need not necessarily be - indeed, may well not be - an academic teacher of the subject.

When I reply in the way described, I see further questions kindle in the interrogator's eye. "What do philosophers do in the mornings when they get up?" they ask themselves, privately. Everyone knows what a barrister or carpenter does. The teaching part in "teaching philosophy" is obvious enough; but the philosophy part? Do salaried philosophers arrange themselves into Rodinesque poses, and think all day long?

But the question they actually ask is, "How did you get into that line of work?" The answer is simple. Sometimes people choose their occupations, and sometimes they are chosen by them. People used to describe the latter as having a vocation, a notion borrowed from the idea of a summons to the religious life, and applied to medicine and teaching as well as to the life of the mind. No doubt there are people who make a conscious decision to devote themselves to philosophy rather than, say, tree surgery; but usually it is not an option. Like the impulse to write, paint, or make music, it is a kind of urgency, for it feels far too significant and interesting to take second place to anything else.

The world is, however, a pragmatic place, and the dreams and desires that people have to be professional sportsmen, or prima ballerinas, or best-selling authors tend to remain such unless the will and the opportunity are available to help them onward. Vocation provides the will; in the case of philosophy, opportunity takes the form of an invitation, and a granting of licence to take seriously the improbable path of writing and thinking as an entire way of life. In my case, as with many others who have followed the same path, the invitation came from Socrates.

When Socrates returned to Athens from his military service at Potidiae, one of the first things he did was to find out what had been happening in philosophy while he was away, and whether any of the current crop of Athenian youths was distinguished for beauty, wisdom, or both. So Plato tells us at the beginning of his dialogue Charmides, named for the handsome youth who was then the centre of fashionable attention in Athens. Always interested in boys such as Charmides, Socrates engaged him in conversation to find out whether he had the special attribute which is even greater than physical beauty - namely, a noble soul.

Socrates' conversation with Charmides was the trigger that made me a lifelong student of philosophy. I read that dialogue at the age of 12 in English translation - happily for me, it is one of Plato's early works, all of which are simple and accessible; and it immediately prompted me to read others. There was nothing especially precocious about this, for all children begin as philosophers, endlessly voicing their wonder at the world by asking "wh-" questions - why, what, which - until the irritation of parents, and the schoolroom's authority on the subject of Facts, put an end to their desire to ask them.

I was filled with interest and curiosity, puzzlement and speculation, and wanted nothing more than to ask such questions and to seek answers to them for ever. My good luck was to have Socrates show that one could do exactly that, as a thing not merely acceptable, but noble, to devote one's life to. I was smitten by the nature and subject of the enquiries he undertook, which seemed to me the most important there could be. And I found his forensic method exhilarating - and often amusing, as when he exposes the intellectual chicanery of a pair of sophists in the Euthydemus, and illustrates the right way to search for understanding. Presented with such an example, and with such fascinating and important questions, I concluded that there is no vocation to rival philosophy.

These juvenile interests were more or less successfully hidden from contemporaries in the usual way - under a mask of cricket, rugby and kissing girls in the back row of the cinema - because being a swot was then, as always, a serious crime; but although all these disguises were agreeable in their own right, especially the last (the charms of Charmides notwithstanding; but they anyway expanded my view of what human flourishing includes), they could not erase what had taken hold underneath - a state of dazzlement before the power and beauty of ideas, and of being fascinated both by the past and the products of man's imagination. It was a fever that took hold early, and never afterwards abated.

My youthful discovery of philosophy occurred in propitious circumstances, in the sense that I grew up in a remote region of the world, the parts of central and east Africa described by Laurens van der Post in his Venture Into The Interior. This was before television services reached those high, dusty savannahs and stupendous rift valleys, and therefore members of the expatriate English community there, of which my family was part, were much thrown on their own devices, with reading as the chief alternative to golf, bridge and adultery.

In the pounding heat of the African tropics all life is shifted back towards dawn and on past evening, leaving the middle of the day empty. School began at seven and ended at noon. Afternoons, before the thunderstorms broke - one could set the clocks by them - were utterly silent. Almost everyone and everything fell asleep. Reading, and solitude of the kind that fills itself with contemplations and reveries, were my chief resources then, and became habitual.

With parents and siblings I lived the usual expatriate life of those distant regions before Harold Macmillan's winds of change. It was a life of Edwardian-style magnificence, made easy by servants in crisp white uniforms, who stood at attention behind our wicker chairs when we took our ease on the terrace, or beside the swimming pool or tennis court, in our landscaped garden aflame with frangipani and canna lilies. Maturing reflection on this exploitative style of life, together with the realisation that Plato's politics are extremely disagreeable (today he would be a sort of utopian fascist, and perhaps worse), gave my political views their permanent list to port.

My mother always yearned for London, and clucked her tongue in dismay, as she read the tissue-paper airmail edition of the Times, over the shows and concerts being missed there. I agreed with her, in prospective fashion. But a good feature of this artificial exile was the local public library. It stood on the slope of a hill, on whose summit, thrillingly for me, lay the skeletal remains of a burned-out single-seater monoplane. In the wreckage of this aircraft I flew innumerable sorties above imag ined fields of Kent, winning the Battle of Britain over again. But I did this only in the intervals of reading under a sun-filled window in the empty library, eccentric (as I now see) in its stock of books, but a paradise to me.

I had the good fortune to meet Homer and Dante there, Plato and Shakespeare, Fielding and Jane Austen, Ovid and Milton, Dryden and Keats; and I met Montaigne on its shelves, Addison, Rousseau, Dr Johnson, Charles Lamb and William Hazlitt - and Hume, Mill, Marx and Russell. From that early date I learned the value of the essay, and fell in love with philosophy and history, and conceived a desire to know as much as could be known - and to understand it too.

Because of the miscellaneous and catholic nature of these passions, the books in the strange little library gave me a lucky education, teaching me much that filled me then and fills me still with pleasure and delight. One aspect of this was the invitation to inhabit, in thought, the worlds of the past, not least classical antiquity. In ancient Greece the appreciation of beauty, the respect paid to reason and the life of reason, the freedom of thought and feeling, the absence of mysticism and false sentimentality, the humanism, pluralism and sanity of outlook that are so distinctive of the cultivated classical mind, provide a model for people who see, as the Greeks did, that the aim of life is to live nobly and richly in spirit.

In Plato this ideal is encapsulated as "sophrosyne", a word for which no single English expression gives an adequate rendering, although it is standardly translated as "temperance", "self-restraint" or "wisdom". In his most famous and widely read dialogue, the Republic, Plato defines it as "the agreement of the passions that Reason should rule". If to this were added the thought - reflecting the better part of modern sensitivity - that the passions are nevertheless important, something like an ideal conception of human flourishing results.

When not in Athens I was in ancient Rome. For the Romans in their republican period something more Spartan than Athenian was admired, its virtues ("vir" is Latin for "man") being the supposedly manly ones of courage, endurance and loyalty. There is a contrast here between civic and warrior values, but it is obvious enough that whereas one would wish the former to prevail, there are times when the latter are required, both for a society and for its individual members. For a society such values are important in times of danger, such as wartime; and for individuals they are important at moments of crisis, such as grief and pain.

The models offered by Rome were Horatius - who defended the bridge against Tarquin the Proud and Lars Porsena - and Mucius Scaevola, who plunged his hand into the flames to show that he would never betray Rome. Unsurprisingly, the dominating ethical outlook of educated Romans was stoicism, the philosophy that taught fortitude, self-command and courageous acceptance of whatever lies beyond one's control. The expressions "stoical" and "philosophical", to mean "accepting" or "resigned", derive from this tradition.

One Saturday afternoon when I was 14 I bought - for sixpence, at a fete run by the Nyasaland Rotary club - a battered copy of GH Lewes's Biographical History of Philosophy, which begins (as does the official history of philosophy) with Thales, and ends with Auguste Comte, who was Lewes's contemporary. Lewes was George Eliot's consort, a gifted intellectual journalist, whose biography of Goethe is still the best available, and whose history of philosophy is lucid, accurate and absorbing. I could not put it down on first reading, and in all must have read it a dozen times before I had my fill. It superinduced order on the random reading that had preceded it, and settled my vocation.

When I returned to England as a teenager, it was to a place intensely familiar and luminous because whenever in my reading I was not either in the ancient world or somewhere else in history, I was there - and especially in London. Everywhere one goes in London, even on ordinary daily business, one encounters its past and its literature - retracing Henry James's first journeys through the crowded streets of what was in his day the largest and most astonishing city in the world, seeing Dickens's Thames slide between its oily banks, and Thackeray's Becky tripping down Park Lane smiling to herself.

In this spirit my imagination heard the roar from Bankside, where pennants fluttered above the bear garden and the theatres, and saw crowds milling under the jewelled lanterns of Vauxhall Gardens, where fashion and impropriety mingled. Deptford on the map seemed to me a horrifying name, because Marlowe was stabbed there. On the steps of St Paul's I thought of Leigh Hunt's description of the old cathedral, before the fire, when it was an open highway through which people rode their horses, in whose aisles and side-chapels prostitutes solicited and merchants met to broker stocks, and where friends called to one another above the sound of matins being said or vespers sung.

London is richly overlaid by all that has happened in it and been written about it. There is a character in Proust who is made to play in the Champs-Elysées as a boy, and hated it; he later wished that he had been able to read about it first, so that he could relish its ghosts and meanings. Luckily for me I came prepared just so for London.

It seemed entirely appropriate to me later, as an undergraduate visiting London at every opportunity, to spend afternoons in the National Gallery and evenings in the theatre (every night if it could be afforded - and even when not) because that is what my companions - my friends on the printed page under the sunlit window in Africa, such as Hazlitt, Pater and Wilde - intimated was the natural way of relishing life.

But it was not just the relish that mattered, for everything offered by art, theatre and books seemed to me rich grist for the philosophical mill, prompting questions, suggesting answers for debate and evaluation, throwing light on unexpected angles and surprising corners of the perennial problems of life and mind.

An education as a philosopher involves studying the writings of the great dead, which enables one to advance to engagement with the technical and often abstruse debates of contemporary philosophy. But philosophical education requires more than this too, for in order to do justice to the question of how these debates relate to the world of lived experience, a wide interest in history, culture and science becomes essential. The reason is well put by Miguel de Unamuno. "If a philosopher is not a man," he wrote, "he is anything but a philosopher; he is above all a pedant, and a pedant is a caricature of a man."

At Oxford I had the good fortune to be taught by AJ Ayer, a gifted and lively teacher, and PF Strawson, one of the century's leading philosophical minds. There were other accomplished philosophers there whose lectures and classes I attended, but I benefited most from personal intercourse with these two. And when in my own turn I became a lecturer in philosophy, first at St Anne's College, Oxford and then at Birkbeck College, London, I appreciated the force of the saying "docendo disco" - by teaching I learn - for the task of helping others grasp the point in philosophical debates has the salutary consequence of clarifying them for oneself.

Socrates liked to tease his interlocutors by saying that the only thing he knew was that he knew nothing. There is a deep insight in this, for the one thing that is more dangerous than true ignorance is the illusion of knowledge and understanding. Such illusion abounds, and one of the first tasks of philosophy - as wonderfully demonstrated by Socrates in Plato's Meno - is to explore our claims to know things about ourselves and the world, and to expose them if they are false or muddled.

It does so by beginning with the questions we ask, to ensure that we understand what we are asking; and even when answers remain elusive, we at least grasp what it is that we do not know. This in itself is a huge gain. One of the most valuable things philosophy has given me is an appreciation of this fact.

Another is the permission to keep alive and fresh the child's curiosity that first prompted me to take Plato's Charmides from the library shelf. "Philosophy begins in wonder," Alfred North Whitehead said, "and when philosophic thought has done its best, the wonder remains." Another thing Socrates could have said that he knew, because all students of philosophy know it, is that the wonder arrived at by philosophy is an enriched and insightful wonder, and is one of the most exalted possessions of the human spirit.

 AC Grayling teaches philosophy at Birkbeck College, University of London. His latest book, The Meaning Of Things, based on his Last Word column in the Guardian, is published this week by Weidenfeld & Nicolson (£12.99). To order it from Guardian Culture Shop at £10.99 (plus p&p), call 0870 066 7979.