Ailleurs is an adverb with a few different meanings. By itself, ailleurs means “elsewhere,” in both a literal and figurative sense:
On te souhaite, ben, beaucoup de réussite,
We wish you, well, a great deal of success,
si tu vas en Australie ou ailleurs.
whether you go to Australia, or elsewhere.
Captions 106-107, 4 Mains pour 1 Piano - Médaillon de Homard
Play Caption
Désolé, je n’ai pas entendu la question. J’avais la tête ailleurs.
Sorry, I didn’t hear the question. My mind was elsewhere.
You can also find ailleurs in the more absolute phrases nulle part ailleurs (nowhere else) and partout ailleurs (everywhere else):
...et des poissons qu'on ne trouve nulle part ailleurs.
...and fish that one cannot find anywhere else.
Caption 15, Le Journal - L'île de Pâques
Play Caption
La situation s’améliore partout ailleurs.
The situation is improving everywhere else.
Ailleurs can also be found in two common phrases that are used to add extra information to a topic. The first of these is par ailleurs (otherwise, additionally):
La préfecture du Rhône a par ailleurs mis en place un centre d'appel.
Additionally, the Rhône Prefecture has set up a call center.
Caption 33, Le Journal - La grippe aviaire
Play Caption
The second phrase, d’ailleurs, has a wide range of meanings:
C'est un très bon vin et
It's a very good wine and
d'ailleurs je vous conseille de le boire.
I recommend that you drink it, for that matter.
Caption 4, Actu Vingtième - Vendanges parisiennes
Play Caption
C'est d'ailleurs lui qui préface le livre.
He's the one who prefaces the book, by the way.
Caption 10, Alsace 20 - 100 recettes pour 100 vins
Play Caption
Un très beau lieu d'ailleurs.
A very beautiful place, incidentally.
Caption 66, LCM - Concert: La Folia à l'abbaye Saint-Victor
Play Caption
Both d’ailleurs and par ailleurs can be placed pretty much anywhere in a sentence. For instance, we could easily move the phrases from the middle of the sentence to the beginning in the examples above:
Par ailleurs, la préfecture du Rhône a mis en place un centre d’appel
D’ailleurs, c’est lui qui préface le livre.
An easy way to learn the difference between these very similar phrases is to learn synonyms for them. Par ailleurs is generally synonymous with d’autre part and d’un autre côté (otherwise, on the other hand), while d’ailleurs is synonymous with du reste (furthermore), en outre (besides), and de plus (moreover). In other words, while d’ailleurs tends to be used to confirm what was previously said, par ailleurs is more often used to contradict it or provide an alternative.
That pretty much covers all the uses of this word, but if you’re interested in looking ailleurs for some more translations and example sentences, this Larousse entry is a handy summary of everything we mentioned above.