Honestly... you can't unless you are ready for him.
Ryze is really bad balance wise as he is completely OP but his winrate is incredibly low because he is really hard to play. My recommendation would be to pick Chogath into Ryze and have your jungler camp the shit out of you until he has no towers in the top lane and then try and make plays elsewhere on the map. Chogath can disrupt Ryze pretty well with his knockup and silence. If Ryze ever, I mean EVER W snares you scream at his face immediately and run away.
In a teamfight setting though. Everyone just focus Ryze and kill him until he is dead. If you can't do that, well you probably lost that teamfight as he will probably sustain through any damage you can deal individually and lock you down and (kinda) burst you to 0 before you can get away. He only has one Snare at a time so if you unload CC on him and keep him from having W uptime, he will not be able to keep himself alive as his tankiness is tied to his damage output so shutting him down is a must.
He's OP as fuck. Luckily, most people are kinda bad with him. I'm not that great personally but I have completely carried games with him and it just seems unfair if Ryze gets rolling as he can just force fights if he gets far enough ahead and you really can't do anything about it.