What is the difference between an arhat, a bodhisattva and a buddha? References to the scriptures would be most helpful.
I'm open to both Theravada and Mahayana perspectives.
According to the Prasangika-Madhyamika Mahayana school of Tenets,
A Hinayana arhat abandoned afflictive obscurations by way of realizing emptiness, but has not abandoned knowledge obscuration. He as achieved abiding nirvana. Therefore, although they are free from the conception of true existence, and from true suffering, they are not free from the imprints of ignorance (i.e. knowledge obscurations). We say that it is like removing garlic from a container: the smell will still be there. So, because they still have the imprints of ignorance, (1) they are not free from the appearance of true existence, and (2) they are reborn with a mental body, due to the imprints of ignorance (in our case, we are reborn to due karma and afflictions).
In his commentary to Maitreya’s Sublime Continuum: The Essence of a One Gone Thus, Gyaltsab Je says:
For the Hearer and Solitary Realizer arhat, because they do not meditate on the perfection of wisdom. It means that although Sravaka and Pratyekabuddha arhats cultivated the wisdom realizing emptiness, their wisdom is not conjoined with bodhicitta. Therefore, it is not a perfection of wisdom.
Commenting Gyaltsab Je, Geshe Jamphel Gyaltsen said:
Bodhisattvas, hearers (shravakas) and solitary realizers (pratyeka buddhas) arhats do have realizations of reality, but they do not realize it in the same way as a buddha.
The Hinayana arhats and bodhisattvas on the three pure grounds, are reborn due to uncontaminated karma that propels them to take birth and their body is a called a mental body.
A bodhisattva is a person who generated effortless bodhicitta (the wish to achieve enlightenment for the sake of all sentient beings). Since effortless bodhicitta is the entry gate to the Mahayana path, he entered the Mahayana small path of accumulation. When he cultivates wisdom, it is conjoined with emptiness and that makes his mind vast (due to bodhicitta) and profound (due to realizing emptiness). He wishes not to abide in individual liberation (abiding nirvana) but to be free from the extreme of peace (abiding nirvana) as well as from samsara. Therefore, he wishes to achieve non-abiding nirvana, which is the attainment of a buddha.
We say that in terms of wisdom, a Hinayana arhat is more powerful than a bodhisattva before the 8th bhumi, because he abandoned afflictive obscurations while the bodhisattva abandons them from the 8th ground.
Geshe Jamphel Gyaltsen said:
Having generated spontaneous bodhicitta the bodhisattva has entered the Mahayana path [the path of accumulation] and the cause is great compassion, the concern for all sentient beings. He blocks the two extremes in two ways.
The Lam Rim, Shantideva’s Bodhisattvacharyāvatāra, Asanga's Bodhisattvabhumi, and Maitreya’s Ornament for Clear Realization explain well what bodhicitta is, how it is the entry gate to the Mahayana, etc.
A Buddha abandoned both afflictive and knowledge obscuration, having generated the path perfection of wisdom (the wisdom of emptiness conjoined with bodhicitta). In his continuum, wisdom and bodhicitta are the same mind: the omniscient mind of a buddha that realizes all objects of knowledge directly, past present and future, in an unmistaken way, etc. He achieved non-abiding nirvana, abiding neither in samsara nor in individual liberation. His enlightened activities are uninterrupted.
Maitreya’s Sublime Continuum explains the two bodies of a buddha that can also be divided into three, four, or five.
What is the difference between an arhat, bodhisattva and a buddha?
It's not easy to give an explicit answer, the rather thorough one is here. An Arhat must be a Bhikkhu living a monastic life but a Bodhisattva is not necessary. The goal for the Arhat path aspires to conquer the afflictions of mind thus sever the cord of Samsara and dwell in Nirvana, the Bodhisattva path is in dealing with the afflictions acquired the wisdom (Bodhi) thus returned again and again to Samsara cultivating merits and wisdom by ferrying others from the sea of suffering, the Samsara.
The Bodhisattva path has detailed grades of advancement, main categorization is from the 1st grade to the 10th:
...佛告觀自 在菩薩曰。善男子。成就大義得未曾得出世間心生大歡喜。是故最初名極喜地。遠離 一切微細犯戒。是故第二名離垢地。由彼所得三摩地及聞持陀羅尼。能為無量智光依 止。是故第三名發光地。由彼所得菩提分法。燒諸煩惱智如火焰。是故第四名焰慧地 。由即於彼菩提分法方便修習。最極艱難方得自在。是故第五名極難勝地。現前觀察 諸行流轉。又於無相多修作意方現在前。是故第六名現前地。能遠證入無缺無間無相 作意。與清淨地共相隣接。是故第七名遠行地。由於無相得無功用。於諸相中不為現 行煩惱所動是故第八名不動地。於一切種說法自在。獲得無罪廣大智慧。是故第九名 善慧地。麁重之身廣如虛空。法身圓滿譬如大雲皆能遍覆。是故第十名法雲地。... 《解深密經》
The article in earlier link said the 7th grade is equivalent to an Arhat in terms of Liberation (解脫), from 8th grade onward a Bodhisattva has acquired wisdom and ability beyond an Arhat does. The article is said to be written by ven. 聖嚴法師 it should be a trusted source.
In addition the 8th grade Bodhisattva is able to cite his own version of Dharani (Mantra) (which I believe is the Ultimate Knowledge of sound), and will never ever stumble from The Path until attained Buddha-hood for he has seen the Ultimate Reality.
A Buddha is the 11th grade - so to speak:
...永斷 最極微細煩惱及所知障無著無礙。於一切種所知境界現正等覺。故第十一說名佛地... 《解深密經》
Now the "body" for an Arhat, a Pratyeka-buddha and Tathagata the Buddha are also different:
...佛告曼殊室利菩薩曰。善男子。若於諸地波羅蜜多。善修出離轉依成滿。是名如 來法身之相。當知此相二因緣故。不可思議無戲論故。無所為故。而諸眾生計著戲論 有所為故。世尊。聲聞獨覺所得轉依。名法身不。善男子。不名法身。世尊。當名何身。善 男子。名解脫身。由解脫身故說一切聲聞獨覺。與諸如來平等平等。由法身故說有差 別。如來法身有差別故。無量功德最勝差別。算數譬喻所不能及... 《解深密經》
Namely, Tathagata the Buddha has the Dharma-body (法身), but Arhat and Pratyeka-buddha has Liberation-body (解脫身), not Dharma-body. I think it's like comparing a cloth with stain removed (Liberation-body) to a cloth that's spotless (法身).
And there are detail explanations about how the "body" of the Tathagata-buddha is different from and capable of doing, in 《解深密經》.