It's inevitable. Anyone who speaks up about climate change, whether in public or in family or social circles will eventually encounter somebody who either rejects the science or rejects action.
This can be stressful, since none of us likes conflict. So, what do we do?
Here are some tips:
1) Pick Your Battles. Most of the time, it's not worth engaging, since you are unlikely to win over a climate denier, and the experience saps your time and energy that you can be investing in positive change. Ask yourself if it's really important to you or your cause to wade in with this specific person. Sometimes it is, in which case, go to step two.
2) It's Not About The Facts. Disputes over climate change are more tribal and ideological than they are about what's true. Climate deniers say lots of things that are scientifically disprovable, but trying to correct them head on usually doesn't work. Resistance to facts is tied up with the implications of accepting those facts, and how that may change the person's way of life or identity. Once we see this, it leads to a different approach.
3) Build From Common Ground. Take a less direct approach. Establish a rapport so that the person doesn't see you as hostile. Find out what's important to him/her, whether it's jobs, or their kids, or their health. Then, explore solutions through those lenses instead without necessarily talking about climate change directly. "Clean energy," for example, is often more acceptable to climate deniers on other grounds like reducing air pollution and asthma or creating jobs. Find those little wins first, and build on them over time.
Here's a neat article about one person's approach to all this, using the acronym EGRIP.
A note on trolls - those people who show up repeatedly with disparaging comments, usually on your social media feeds. You are under no obligation to give trolls a forum, so consider blocking or banning them quickly.