Few different ways. As other people have pointed out, they’ll have weights (Sometimes giant metal balls, sometimes pools of water.) that can weigh hundreds of tons to counteract any sway. Another way though is to shape the building to cope with the wind.
Many skyscrapers will get thinner as you go up since the wind gets faster the higher you go. This is super notice with the [Burj Khalifa](https://upload.wikimedia.org/wikipedia/en/thumb/9/93/Burj_Khalifa.jpg/240px-Burj_Khalifa.jpg) since it really embraces this look. Next, you know how planes and ships will have smoothe edges so they can move through the air/water faster? Well the same applies to stationary buildings. You can go [thin and pointy](https://images.adsttc.com/media/images/5b86/c8b2/f197/cc5a/2500/01da/medium_jpg/Moscow_1.jpg?1535559835) with the pointy end in the same direction as the wind, [twisted and curvy](https://i.pinimg.com/originals/b6/17/8f/b6178fcea46007f052dcdd3809c0599e.jpg) so the wind can flow off the surface instead of hitting it head on, [get really twisted](https://lh4.ggpht.com/-wV8ZNgYRP7k/UXYvEmV7QII/AAAAAAAAnt8/AHPx4cUhYak/evolution-tower-32.jpg?imgmax=800) so the wind hugs the building but pushes itself upward and away, or [literally just punch a hole](https://upload.wikimedia.org/wikipedia/commons/thumb/d/d9/%E4%B8%8A%E6%B5%B7%E5%9B%BD%E9%99%85%E9%87%91%E8%9E%8D%E4%B8%AD%E5%BF%83.jpg/240px-%E4%B8%8A%E6%B5%B7%E5%9B%BD%E9%99%85%E9%87%91%E8%9E%8D%E4%B8%AD%E5%BF%83.jpg) in the top so the wind has somewhere to easily go.
Great video by Vox on this: https://youtu.be/ebx5Y5qOmTM
Latest Answers