The definition I’ve always used comes from a liberation theologian named Ada Maria Isasi Diaz. (though my own politics aren’t Catholic, I think it fair to say that anarchism, and the left generally in the US has recieved some vital inspiration from Latin American libration theology). She has an essay on replacing the idea of charity with solidarity. In it, she argues that solidarity means standing next to those you are trying to be in solidarity with. This departs from, and can require a bit more commitment, more traditional meanings. It means you can’t just say “I am in solidarity with X”. To be in solidarity with an individual or group, the system of social relations must have an increasingly difficult time differentiating between you and the group or individual. It means substantively taking on the burden of the group you are in solidarity with. The implications are complicated, but one key step is not emphasizing difference.
And example: a button that says “straight but not narrow” is intended as a statement of solidarity with queer communities, but a more substantive statement might be a pink triangle worn by a heterosexual individual. It basically says, I’m standing next to you; I’m making those made invisible more visible; and I’m willing to be in the same danger you are in, so that we can all stand together stronger.
As evandar says above, action is important. For example, monetary support for a group or cause is substantive, and fits my definition of solidarity, as the system of relations sees you as similar to the group in question if you are financially connected or supportive.