if h5 push h4
Why do people randomly play a5,a4,h4, or h5?


In GM games where i've seen it they tend to respond with an opposing pawn move. a4 is also an anti-marshall, i believe Kasparov used it to avoid Marshall lines.

In GM games where i've seen it they tend to respond with an opposing pawn move. a4 is also an anti-marshall, i believe Kasparov used it to avoid Marshall lines.
thanks

This is a nice article by GM Serper. It gives examples of Magnus Carlsen (and others) playing a4 and h4.
https://www.chess.com/article/view/lessons-from-carlsen-the-draw-problem

Sometimes when I am playing a game and we are out of the opening stage, my opponent just plays h5 randomly. Why is this? If I ignore it I get into terrible situations because they just push their pawn to h3 with the support of their rook. is there any way to counter this?
I believe you answered your own question when you said "If I ignore it I get into terrible situations..." Those pawn pushes can sometimes be powerful especially toward a castled king or a fianchettoed bishop (or both). As has already been mentioned, sometimes the best response is to stop the pawn with one of your own. Other times it's best to ignore it.

At your level, most of the time it means that your opponent forgot lines and is trying to improvise. At higher levels, it means they are trying out a new line or trying to create some play on the flanks.

At your level, most of the time it means that your opponent forgot lines and is trying to improvise. At higher levels, it means they are trying out a new line or trying to create some play on the flanks.
or they just want to mess around lol

They could be trolling if a4/h4 (a5/h5) is played move 1
No bro! He is talking about midgames where some of the players don't have accurate plan so they simply move it so that you would move something inaccurate or blunder type by which they could get advaantage of it...Somewhat like positional plan.
Sometimes when I am playing a game and we are out of the opening stage, my opponent just plays h5 randomly. Why is this? If I ignore it I get into terrible situations because they just push their pawn to h3 with the support of their rook. is there any way to counter this?