I'm not good with explaining things.. Hopefully this helps you. you know when a pawn can be eaten when it gives you the advantage to place your powerful peice to a square where it will become safe... and forks or target an hanging powerful peice of your opponent.
How do you know when to exchange pawns?

Yeah, it's a tough topic because those decisions can be purely tactical, purely strategic, and anything in between.
I'll (perhaps foolishly) try to give a really brief overview of such a difficult topic.
When your advantage is temporary (like development, or a one-chance tactic due to their temporarily poor piece placement) then that's usually when you're needing to exchange (to open lines) or push (to open lines as a sacrifice as in IQP positions).
Another way to think of these positions is that over the next few moves your opponent can improve his position relatively more than you can improve yours. So act now!
The other type is when your opponent can't easily improve his position. Maybe he's already developed and now he has to look around for a plan but there isn't really anything he can do. In those cases it's almost always good to keep the tension. Over the next few moves you can improve your position relatively more than they can. So wait for the maximum difference before opening lines and starting a fight.
---
IMO those are the basic tactical and positional considerations (tactical is always short term, and positional is short term non-tactical).
There are also strategic considerations (long term non-tactical). As an easy example think of the French advance variation. You push the pawn to e5 then (sometimes) try to attack on the kingside due to your extra space. Long term considerations can't be calculated OTB. You make decisions like these based on your general chess knowledge.
---
Lastly I'd say that don't be too hard on yourself. If the engine wanted a move that gives you +1.5 and your move is +0.8 then you still chose a good move. What matters more is whether you followed up logically. Reasonable moves that a followed up consistently will make you a tough player to beat. Only top pros have to worry about every tenth of a pawn they can get.
---
For tactical things just follow the engine's lines. It will show you exactly why you needed to do ____ at that particular moment (always compare it to a different line so you can see why the engine's suggestion is better).
Other positions are a little harder to understand because there's no single line that makes it good. I'll try to give some basic examples of positions like that below:

And experienced players have little bits of knowledge that help them out.
For example in IQP positions white pushing d5 as a sacrifice.
For example in a Maroczy when black plays d5, white usually captures once, then pushes the other. e.g. ...d5 cxd exd and now e5.
In a game that started 1.e4 e5 when black pushes f5 white almost always captures.
A GM could probably make a list like this that's 100 items long
A great book, by the way, is Soltis' "Pawn Structure Chess"
Others swear by Kmoch's "Pawn Power in Chess" (but I haven't read that one, so I always recommend Soltils. It's not my impression Kmoch is bad though).

And experienced players have little bits of knowledge that help them out.
For example in IQP positions white pushing d5 as a sacrifice.
For example in a Maroczy when black plays d5, white usually captures once, then pushes the other. e.g. ...d5 cxd exd and now e5.
In a game that started 1.e4 e5 when black pushes f5 he can often get a dangerous attack if he's allowed to push f4 (and sometimes a dangerous attack if he's allowed to open the f file). So very often white will capture on f5, almost no calculation needed. You open the center as part of your counterplay.
A GM could probably make a list like this that's 100 items long
A great book, by the way, is Soltis' "Pawn Structure Chess"
Others swear by Kmoch's "Pawn Power in Chess" (but I haven't read that one, so I always recommend Soltils. It's not my impression Kmoch is bad though).
I'm going to read the book, I believe I need to do so. Also, thanks for your explanation and examples.
Let me put an example of one of my games:
10. .. Black does c5, which apparently is a mistake, because black should have done dxc4. Then 11. white does dxc5, which is an innaccuracy, because cxd5 is best, and black does Bxc5, which is a mistake. And 12. e4 is a blunder, but right after that dxe4 is a mistake.
I understand 12. e4 blunder, because I would've eaten a free pawn with cxd5, and after exd5, Nxd5. But I don't understand the logic behind everything else.
We both played what made sense to us and we failed in every choice. Of course I try to follow the engine lines and see what would've happened, but I cannot comprehend why that line is better or another is worse.
It happens with the rooks too. Like in that game, 10. Re1 is a mistake. Apparently the right move was b3. In the games I don't play Re1 the engine says I should've played Re1 instead of some other move. But whatever.
I'm just trying to improve my chess comprehension. It's really difficult.

Yeah, it's really tough. I think I would have made the right move in each of those cases... but not because I understand chess better. It's just from experience I know a lot of common moves.
For example (unless it's some reti or catalan type) you almost always play cxd (either as white or black) not dxc when all 4 pawns are like that.
You also almost always open the c and d files, so the rooks (for both players) belong on c and d (not on e).
That's also part of the reason you capture on c5 with the knight (you're unblocking the d file for your heavy pieces).
12.e4 block's 3 of white's pieces (rook, bishop, and knight) so capturing it seems like a gift (you're unleashing all those pieces).
---
But again, what I'm saying is more borne from I'm just really familiar with this type of position... but it does seem like the idea of blocking is a common theme that maybe would help you out. When placing your pieces notice they block your friendly pieces. For example on white's move 7, he's blocking the d file. If the pawns were on d4 c4, d5 c5 this would probably be bad since the d file will likely open and white will want it clear for a rook. But since black took time to play c6 (and not c5) I think Bd3 is reasonable... but to be consistent probably white wants to play 9.cxd to get an orthodox structure where the plans don't typically see the d file opening any time soon (or like the engine suggests, 9.c5)
In the orthodox exchange structure white's plans are either a minority attack or the e4 pawn break. And hey, actually in that case Re1 makes sense. Maybe you're just mixing plans without realizing it.
A standard way to equalize for black is 7...dxc followed by either e5 or c5 (probably not right away, I'm just talking about basic structure ideas).
These sorts of things are covered in Soltis' book, and you can even find a summary of it online on wiki
(scroll down to orthodox exchange for what I was talking about)
https://en.wikipedia.org/wiki/Pawn_structure

Dear @sitting_duck,
As of this moment this is my official favorite post on chess.com. Not only was it hilarious, but the cathartic bursts of laughter that it produced were a balm to my pawn-tortured soul. God bless you, and may the power to fork be with you - I hope that your pawn travails are now but distant memories!
So in many games pawns are in the center, in tension. Sometimes I eat the pawn, sometimes I don't eat the pawn. Now, whenever I run analyses of my games, I ALWAYS MAKE THE WRONG DECISION.
The machine says:
When I don't eat the pawn and decide to keep the tension
MACHINE: Inaccuracy. you should've eaten the pawn.
When I eat the pawn and decide to exchange pawns
MACHINE: Inaccuracy. you shouldn't have eaten the pawn.
When I'm fed up with the dreadful pawn nonsense and instead of exchanging pawns or keeping the tension I advance my pawn one square ahead.
MACHINE: Mistake! Why did you do that?
Until last game. Last game I decided to do nothing about the #@!%ing center pawns.
MACHINE: BLUNDER!! DON'T YOU SEE IT WAS OBVIOUS TO ADVANCE YOUR PAWN ONE SQUARE?
ME: FORK YOU, MOTHERFORKER.
And sometimes it's not a good move to eat the pawn and one move later it is, sometimes it's the opposite.
So my question is what kind of calculations are involved in making a Good move in these situations. I don't need Best, I don't need Excellent, I would be happier than ever with just "Good".
Anything that doesn't involve memorizing 300 opening lines, except if that is the only way (in such case you should tell me).