yakṣha - semi-celestial beings who exude power and wealth
rakṣhānsi - powerful beings who embody sensual enjoyment, revenge, and wrath
rājasāḥ - those in the mode of passion
pretān-bhūta-gaṇān - ghosts and spirits
cha - and
anye - others
yajante - worship
tāmasāḥ - those in the mode of ignorance
janāḥ - persons
Translation
The sattvic, or pure, men worship the gods; the rajasic, or passionate, worship the yakshas and rakshasas; the others, the tamasic or deluded people, worship ghosts and hosts of nature-spirits.