It depends on the specifics, but having certain patterns in mind is the key so you have an idea what to look for. Sometimes:
-we can play a pawn advance to cut off the Bishop and Knight (...d5 at some point here to cut off the Bishop and Knight coordination on the f7 square)
-we can castle to protect the King (and the castled Rook would be on f8 to guard f7.
-we can play a prepared line; in this case, the "Polerio Defense" is probably the refutation to the Italian Game Knight Attack, but this Polerio Defense is sharp and tricky; some people aren't always willing to sacrifice one or two pawns for Black's counterattacking chances, but it is solid and I use it to good success. This Polerio Defense takes some chess study though. The start of this line is 4...d5 5. exd5 Na5! temporarily sacrificing a pawn and sometimes even gives up a second pawn in some lines, but the active play Black gets is dangerous.
I have been playing against a lot of knights attacks with is when the bishop gets brought out and the knight tries to do a fork early on. I have no idea how to counter it though. Can someone give me some help on this?