There isn't a single definition and it isn't always a straightforward as 'treating someone less favourably because of their race' (although that is part of it).
On an individual basis, racism is discriminating against people of colour on the basis of their race. This includes really obvious things like thinking people of colour are less intelligent or less capable, but it's also manifest in more subtle ways that might even seem positive at first - such as saying mixed race babies are prettier or black men are stronger. The reason these latter statements are racist are that they are fetishizing, and imply that black people are both homogenous and exotic. It can lead to real issues, for example black men being more likely to be shot by police because they are perceived as having unusual or dangerous physical strength or power.
There is also institutional racism, which is the way white people are prioritised at a broad level - for example, always centering the experiences of white people, it being more likely that white people will be hired than people of colour, the racial pay gap etc. Institutional racism works in favour of white people at every level - so while life might be hard for a poor white woman, it's still easier for her than it is for a poor black woman because black women face institutional barriers.
Obviously we don't know what your comment was (unless I've cross posted) but it's actually really easy to be racist without meaning to, even if your intentions are good. It's important to listen when you're accused of racism and see if you do need to learn or change. Just as men can't tell women what is or isn't sexist, white people can't tell people of colour what is or isn't racist. Instead we can listen and learn and do better next time if there is somewhere we have fallen short.