Thats a good question, it is extremely difficult even for top players to realise that the time to attack has arrived. A very good idea before going for king hunt is that you develop all your poeces well so in case if it backfires you wont crash bad. Pawn attack with h4-h5 is generally a good idea.
You can watch the games of grandmasters in the opening you play to get better idea of the goal. There is a thing in chess that if you keep playing solid your opponent will blunder on which you can capitalise.
Of coure analysing your games give a fairly good idea too. Hope this was useful, all the best!
Hey, guys! This question has probably been asked by many people, but oh well I guess it is my turn now
I watched "How to play chess" by GothamChess on youtube, where he explained that I should first take control of the center of the board by playing e4 and d4 and then developing my knights and bishops. It all seems easy, if I knew what to do next. I usually just start attacking my opponents pieces, which they can defend pretty well. So my moves seem rather useless. I don't have a long term plan, because I'm not sure if I should start attacking my opponent's king from the very start or should I concentrate on something else. Can someone recommend me a good way to learn strategies of chess?