That's a simple question with one of the most complicated answers on this Stack
We receive climate questions regularly and no wonder. Climate is complex. Unfortunately, most people aren't willing to simply define their climate and move on. They want it to be "realistic." I'm not a fan of "realistic." Too many really good stories get bogged down on trying to be godlike in the creation of the worlds. But that's another issue for another question. What I'm about to do is a horrific over-simplification that makes angels weep, demons laugh, and most dead scientists become zombies seeking my life in the name of scientific jihad. Fair warning. Reading this might give you cancer and put your name on the zombies' list. But remember, climate is complex.
1. Imagine if you will a ball, covered in water, and a hair dryer.
This first step sets up the basics. The hair dryer heats the ocean water on its side of the non-rotating, non-orbiting ball. As the water heats, its expands. That pushes water to the cooler backside of the ball where pressure increases. Eventually water starts forcing its way back toward the hot side of the ball. Chaos theory abounds, so you end up with basic currents across the "terminator" of the ball. Hot-to-cold-to-hot and back again.
Dry your tears, angels of doom! Staunch your laughter, demons of delight! Care not that the hair dryer would eventually evaporate all the water and that a real sun would burn such a world to a crisp! Sit back and enjoy the orgy of scientific debauchery! Avanti!
2. OK, now let's start the ball rotating.
As our water-covered ball (with water that magically can't evaporate, dontchaknow) begins rotating we start seeing some wonderful things. First, the currents get longer and start following latitudinal lines because the hair dryer's effect is lower at the poles than it is at the equator. That will cause currents of different lengths at different latitudes and start some longitudinal mixing. Second, the rotation of the ball will start dragging the water with it, so there are now two forces at play: heat from the hair dryer and the drag of the ball. Thus, you'll begin to see some smaller counter-currents form as as the two forces get in the way of one another. If you think about it, this is kinda a little bit how the Great Eye of Jupiter works (Get... off... my... foot... you... stinking...)
3. Now let's think about the atmosphere.
A bit... just a bit... let's imagine the water can evaporate into an atmosphere, that may or may not have existed in steps #1 and #2. As the world turns (hah.) it's going to exert a drag on both the water (already mentioned) and the atmosphere. This is mostly/kinda/at-least-part-of where Earth gets its Prevailing Westerlies. (Back angels and demons! Back!) But the funny thing is, atmosphere and water retain heat at different rates. Meaning you're not only going to get storms, you're going to get cold water dumping into hot water (you know... rain...) causing even more chaos. This is the primary problem with figuring out climate in your world (have you seen the resources in our List of Worldbuilding Resources? You should...). There's a LOT of chaos. It has order and purpose when you look at it closely enough, but the more pieces of the puzzle you put together, the more that chaos looks incredibly random. (Bobby, would you and your girlfriend go out on a double date with me and that demon over there?)
4. Finally, let's add some mountains, valleys, rivers, lakes, deserts, jungles...
This last step is where all the pain comes from. The ultra-simplification of the first three steps has hopefully made some sense as to the basics of currents and wind. But once you add landmasses, everything gets really ugly. Every flora type has an effect on weather. Every shift in land altitude, every cliff, every other body of water... it's unbelievable how complex this gets.
But (Have you met my girlfriend, Beelzebub? What do you mean you want to go out with Al Gore? He's not even a zombie! You didn't know that?), you can look at this through simplified eyes. When those currents in the first three steps hit a landmass, they turn. It's not like there's anything else they can do. It'll happily move in the new direction (an object in motion...) until something (landmass, change of temperature, another current...) gets in its way and it turns again. Add islands and the little bounders start turning all over the place I SAID BACK ANGELS AND DEMONS OF THE ABYSS!
Wind, of course, can go over the top of most landmasses... kinda. Once you add that third dimension things get really ugly. Let's simplify it this way. Wind can get up and over a shallow-sloped but really tall mountain. But will have a much harder time getting over the top of a sharp-sloped really tall mountain. Mountain ranges tend to channel low-altitude wind.
Oh, yeah, wind has layers. Those layers have a lot to do with how thin the atmosphere is and how well the atmosphere can hold moisture. Oh, and wind affects currents and currents affect wind and the sun affects them both (the hairdryer) and the moon gets in the way, too. And if you haven't noticed, we're now surrounded by tens of thousands of weeping angels and laughing demons. And they look hungry.
Did you actually answer my question
Probably not. I didn't even mention orbits, axial tilts, polar caps, glaciers, volcanos, and quite literally a thousand other variables (did you see a zombie behind the couch? DON'T JOKE ABOUT THINGS LIKE THAT!) But with a little luck I gave you some insight into where to start thinking this very, very, very complicated problem through (did I mention the List of Worldbuilding Resources? I did? OK!) and gave you an idea about how you need to simplify it to avoid being drawn into a Cthulhu-sized orgy of madness. I've seen worldbuilders become absolutely vapor-locked over the details of climate all so they can figure out if their raiding party is passing through a believable rainstorm.
The angels and demons would be much more passive if you just said it was raining and let the details go. But, it's up to you whether or not you want to start giving the little honkers names. I'm just sayin'.