 It was a windstorm. Matthew says the wind was contrary, that is against them. In other words, it was blowing in the opposite direction from what they wanted to go, where they wanted to go. He also tells us that the ship was tossed. So the wind was blowing the ship this way and that way and tossing it about.