Random posts displayed but exclude current entry ID
Here are a couple of useful stackexchange questions


Getting a random entry: Section entries - order by random
Excluding the current entry: Exclude Current Entry


Putting that together:

{% set randomEntry = craft.entries({
  id: 'not '~entry.id,
  order: 'RAND()'
}).first %}


This will fetch entries whose id is not entry.id (entry is the current entry), ordered randomly, and then give you the first of those.

Probably you want to specify the section or sections to fetch your entries from:

{% set randomEntry = craft.entries({
  section: ['thisSection', 'thatSection', 'theOtherSection'],
  id: 'not '~entry.id,
  order: 'RAND()'
}).first %}


This will do the same thing, but only fetch entries from those 3 sections.

After all of that, you should also be sure to test that there actually is an entry:

{% if randomEntry %}
  ... do your thing ...
{% endif %}