It depends upon the severity of the turbulence.
If it’s just light bumps we do nothing.
If it’s a little worse and it might be unsafe to walk around in the cabin, we turn on the fasten seat belt sign and make a quick PA announcement. At this point, we will probably complain about the ride to Air Traffic Control and ask about the ride ahead or at a different altitude.
If it’s bad enough that it’s unsafe for the flight attendants, verging on moderate turbulence, we’ll ask them to terminate service and belt into their jumpseats. We will also advise Air Traffic Control of the situation and beg for a different altitude to find smoother air. We will make frequent PA announcements about the importance of staying seated and giving the pax some update on when it will smooth out. In the cockpit, there’s not much we can do except make sure our stuff is stowed and won’t fall down into some crevice where it disappears forever (How does that happen to my nice pen or little flashlight, are there greedy gremlins down there?). I chug down whatever I’m drinking so that it doesn’t spill everywhere. If we’re at a lower altitude, it helps to slow down. There’s a turbulence penetration speed that we can use. It changes with the weight of the airplane so we’ll slow down to that speed. It’s not a big deal in the cockpit. It’s hard to get my finger onto the right button on the mode control panel sometimes but it just takes a little more time. I find it hard to read the charts or the ipad, especially at night but it’s mostly an annoyance.
Severe turbulence almost never happens and it’s only happened to me once in my 30 year career. In that case, we hope for the best in the cabin and if anybody gets hurt, we support the flight attendants as best we can. Our actions in the cockpit are much the same as with moderate turbulence. The airplane is not in danger structurally but the passengers can get badly injured or even killed in those kinds of situations. I always worry about infants that parents put on the seat next to them to sleep, I’m a parent too and I know it’s very difficult to hold an infant for 4 hours but it’s the safest thing to do.
Turbulence can be scary for passengers but it’s not scary for the folks in the cockpit.