To attack your opponent pieces, well, it depends on what kind of player you are. Perhaps playing defensive whole game waiting for enemy to make mistake or if your position became advantegous, maybe trading pieces for better position for end game(double pawn is pretty harsh for end game), or perhaps knowing how to sacrifice pieces with ulterior motive. It depends really, I think it just rely on personal style.
Basically, try random opening and see which suits your style, play a lot to gain experience (you’ll get a hang of it after losing a lot, least that’s how I started chess), don’t be afraid on experimenting moves(like trying some daring move. As we all know, Edison didn’t make the lightbulb without failing a lot of times.), lastly have fun (call me Mr. Obvious). I hope this helps!
Many thanks!