It refers to being put on the fringes, or margin. Someone who is marginalised is someone who is not being socially accepted. They're on the 'margin', which means edge, because any further, they'd no longer be a part of society, like banished or imprisoned or executed or shunned or otherwise ostracised. So when someone is marginalised, it's saying they are just one step away from being totally ostracised, which in ways can be worse because society acknowledges them but only as an example of how not to be, so one who is marginalised frequently becomes the object of ridicule and shame. Basically, being marginalised is a fancy way of being called weird, abnormal, not fit for the company of good and decent people.