Sources
Here some ahadith which you may find in sunnah collections with as similar wordings (in bold letters the similar parts with your quote):
sunan ibn Majah:
"Whoever uses stones to clean himself, let him use an odd number of stones. Whoever does that has done well, and whoever does not, there is no harm in it. Whoever uses a tooth stick should spit out (whatever he removes) and whoever removes (the particle of food) by dislodging it with his tongue should swallow it. Whoever does that has done well, and whoever does not, tere is no harm in it.
Whoever goes to the toilet should conceal himself, and if he cannot find anything except a pile of sand(behind which to conceal himself), then he should use that, for the Shaitan plays with the backside of the son of Adam. Whoever does that has done well, and whoever does not, there is no harm in it."
And in sunan abi Dawod:
If anyone applies collyrium, he should do it an odd number of times. If he does so, he has done well; but if not, there is no harm. If anyone cleanses himself with pebbles, he should use an odd number. If he does so, he has done well; but if not, there is no harm.
If anyone eats, he should throw away what he removes with a toothpick and swallow what sticks to his tongue. If he does so, he has done well; if not, there is no harm.
If anyone goes to relieve himself, he should conceal himself, and if all he can do is to collect a heap of sand, he should sit with his back to it, for the devil makes sport with the posteriors of the children of Adam. If he does so, he has done well; but if not, there is no harm.
Note: Both ahadith have been qualified as da'if and the narrator whom narrted the hadith on the authority of abu Hurraira directly Abu Sa'id al-Khayr أَبُو سَعِيدٍ الْخَيْرُ is considered by some scholars as unknown, abu Dawod in his comment of the hadith said he is a sahabi (this is also the opinion of other scholars, like al-Bukhari, ibn Hebban, al-Baghawi ...), in some narration he is called abu Sa'ad al-Khayr أَبُو سَعْدٍ الْخَيْرُ. The narrator whom narrated it on the authority of abu Sa'id al-Khayr in sunan ibn Majah Hossayn al-Himyari حُصَيْنٌ الْحِمْيَرِيُّ is also considered as unknown.
2n Note: The Arabic wording for both of this ahadith is the same the major difference is the first sentence which is in sunan abi Dawod but not in sunan ibn Majah, so the major difference in the text comes from different translations.
Al-Bayhaqi also compiled this hadith on the authority of abu Dawod quoting only the last part of abu Dawod's narration:
If anyone goes to relieve himself, he should conceal himself, and if all he can do is to collect a heap of sand, he should sit with his back to it, for the devil makes sport with the posteriors of the children of Adam. If he does so, he has done well; but if not, there is no harm.
and he said that the hadith of Hossayn al-Hibrani (narrator in sunan abi Dawod) from abu Sa'id al-Khayr isn't strong.
So the version you mentioned is quoted in many hadith collections like (I'm translating and linking only the major sources):
أخرجه الإمام أحمد في المسند (2/371) وابن ماجة (337؛338؛3498) والدارمي (668؛ 2093) والطحاوي في شرح المعاني (1/121-122) وفي المشكل (138) والبخاري في التاريخ الكبير (3/6) وابن حبان في صحيحه (1410) والحاكم (4/137) والبيهقي في السنن (1/94؛104) وفي الخلافيات (367) والبغوي في شرح السنة (3204) من طرق عن ثور بن يزيد عن حصين الحميري عن أبي سعد الخير عن أبي هريرة به.
Musnad Ahmad, a-Darimi, ibn Hebban (same first narrators in the chain as ibn Majah), it is also said that this hadith is compiled by al-Hakim, but i couldn't find it so far.
Some say that al-Hibrani and al-Himyari are the same as it refers to the same (Arabic) tribe. Imam Ahmad said that abu Sa'ad al_Kayr was a companion of 'Omar ibn al-Khattab.
Authenticity
As said the main Issue with this hadith is the status of trustworthiness of some narrators. Some scholars qualified it as hassan or sahih among them are:
abu Dawod, ibn Hebban, al-Hakim in his Mustadrak, al-Imam al-Mundhiri (qualified it as hassan), Imam an-Nawawi (qualified it as hassan) in his commentary on sunan abi Dawod and even qualifeid it as sahih in hic comment on sahih Muslim. And also al-Hafidh 'Ala' ad-Dyn Mughaliti and ibn Mulqin.
Those who qualified it as da'if are:
Al-Bayhaqi, ibn 'Abd al-Barr, ibn Hazm (all because of the two unknown narrators), 'abd al-Haqq al-Ishbili (especially because of al-Hossayn al-Hibrani) ...
Note that it is said that ibn 'abd al-Barr considers abu Sa'ad al-Khayr (also namedabu Sa'id al-Khayr/abu Sa'id without a nickname or surname) a sahabi. A-Daraqotni says's the correct name is abu Sa'ad al-Khayr.
Meaning
I'm just discussing the meaning of your quote based on comments of sunan abi Dawod(by Aabadi) and sunan ibn Majah (by a-Sindi). Note that both versions of the hadith include a repetitive statement, saying:
Whoever does that has done well, and whoever does not, there is no harm in it.
which is not in your quote, so this means there's always a good way to do an act and a better, but if one couldn't do it the best way there's no harm at all!
When a Muslim goes to the toilet, he should conceal himself,
This means if one visit the toilet for defecation one should close the door. > even if it is a pile of sand,
this refers to the situation when one has no possibility to visit a toilet, for example during a travel, you should try to hide your private parts and even your backside even if that means sitting behind a pile of sand to conceal yourself.
because Satan plays with the behinds (or privates) of the children of Adam
here what was translated behinds مقاعد may mean the backsides of a person and also the place one is sitting on in Arabic. Both meanings are valid: the way Satan plays with them could be as follows: Either the backsides being seen by others which shouldn't be as they are 'awrah, or because one didn't conceal himself or didn't get close to the ground (sit or have a sitting position) the wind or any other thing my cause impurities to touch his clothes or himself, for example the pee etc.
From this we can understand this hadith as a true advise for us.
References: on the authenticity see this thread and this fatwa on the etiquette of visiting the toilet and this detailed fatwa about the etiquette of visiting the bathroom in English.