Exploit holes in opponent area
Can someone tell me what to do in this situation?

The first thing to know is that chess is an extremely complex game, where no rules exist other than the ones governing legal moves. All other ideas are just "principles" that tell you when certain moves / structures tend to be good. It's always up to you to determine whether a specific move is good in a position.
At your level, I'd just play more chess, and experiment with the knowledge that you are new to the game, and don't really know anything yet. Just play a lot, especially against tougher opponents, and see what they like to do.

I can see that a zigzag formation can look very strong and hard to attack head-on. One way of thinking about its weakness is that if your opponent puts most or all of their pawns in a zigzag, they're all on squares of one colour. This leaves the squares of the other colour very weak for them, so you can think about occupying those squares with your pieces. Is that any help?
when ever things get complcated this way try to exchange things to your favour...like keep your bishop or rook against your opponents queen and exchange the pawn ahead..he she will take back their pawn and u will get queen or a check...plus after exchanges u can appy more logical brain

If they have their pawns on White squares, usually their Light Squared Bishop (LSB) is blocked by them, while their Dark Squared Bishop (DSB) is not. This makes their LSB weak and their DSB strong. Take their strong Bishop and leave them with the weak one. Usually that helps, but you have to judge if this fits in a particular situation.
And of course, like others said above, zig-zag pawn formations leave holes, where you can put pieces that your opponent can't push away with his pawns (That's what a hole means in Chess)

in addition to the above ideas a) the pawn(s) on the 3rd rank are weaker points, aim your rooks and queens at them b) use your pawn as a lever (ex. W pawns on d4, e3, f4- a B pawn on c5 could help.
wow thanks for the help everyone, didnt expect to get so many replies! I will certainly take all this to mind while advancing further!

Cashmoneysweg you should definitely go to youtube.com and watch some beginner's videos. They will explain all the basics even grandmasters still use. For example:
Get your minor pieces out and castle
attack towards the centre
connect your rooks
Place rooks/queen opposite of opponent's king
Don't block your bishops with your pawns
Also look into some openings and stick with a few that you like. That way, you can become more familiar with some moves and don't have to think too much about every single move in the opening all the time. I, for example, often play the Queen's Gambit, The Indian, or the Scandinavian defence.

@cashmoneysweg : you're welcome
Usually Knights are very good pieces for occupying holes, and also usually very helpful in closed positions, where many pawns are still on the board, because they can jump above them
Also, what you said "if i take a pawn he will just take mine back" doesn't mean that this is not progress... Just because the material remains equal, it doesn't mean that the resulting position is still equal. Perhaps you get an advantage by this exchange, for example by clearing a file or a diagonal or a square where your pieces can operate
But always keep in mind what @Cherub_Enjel said : "No rules exist other than the ones governing legal moves. All other ideas are just "principles" that tell you when certain moves / structures tend to be good. It's always up to you to determine whether a specific move is good in a position."
I've recently taken an interest for chess, one night i suddenly just thought "i should learn to play chess" (not that this story is important) So i am new. When i play with friends it often turns out that they place their pawns in a zig zag pattern. 1 pawn to rank 4 and the next to rank 3, when they do this i feel like i can't really progress because if i take a pawn he will just take mine back. What do i do in this position?