I am trying to understand meaning of
mahram. Can someone explain to me what it means in Islam? I have read about it on the internet but still can't understand its meaning.
Basically a mahram is a person who can't marry a woman for ever (it is haram). This means what ever happens he is by default not allowed to marry her according the shari'a.
From a womans perspective her father (and father's father etc.) her sons (and her son's sons etc.) her brothers (no matter if paternal or maternal) her brothers and sisters sons (and their son's sons etc.) her uncles (maternal and paternal) are mahrams and are quoted in (24:31):
And tell the believing women to reduce [some] of their vision and guard their private parts and not expose their adornment except that which [necessarily] appears thereof and to wrap [a portion of] their headcovers over their chests and not expose their adornment except to their husbands, their fathers, their husbands' fathers, their sons, their husbands' sons, their brothers, their brothers' sons, their sisters' sons, their women, that which their right hands possess, or those male attendants having no physical desire, or children who are not yet aware of the private aspects of women. ...
Read also this fatwa explaining this.
The deep answer is someone who is not likely to be interested in the woman sexually, by direct blood (son,father,uncle, but not cousin), or by other relationships like the father of your husband.
why this is important? because islam makes clear difference between woman relationship with her close family(mehrams) and the outsiders, in the first environment she could wear anything she wants(with logic) , she has completely free life style. with the outsiders environment(not mahrams) woman should follow some guidelines like wearing hidjab, talk with them in respect way , and not seduce, flirt or being playful. and also avoid staying alone with an outsider in the same room for no important reason.