One of the things that irritates most knitters is finding a knot in their yarn.
While there may be occasions when you find more than one knot suggesting a problem, in general finding a knot will be a rare happening, however annoying.
Those rare knots are the result of how yarn is produced using long continuous threads. This can be difficult to maintain and occasionally the yarn will break. It will be joined with a small knot to keep the production process going.
This means that once in a while you will come across a knot that needs to be dealt with. If you are knitting stocking stitch with a DK or thicker yarn it may be possible to just keep knitting and ensure the knot sits on the wrong side.
But if you are working in a textured stitch pattern like in the swatch pictured, or lace, finer yarns and reversible patterns this is not an option. The best option is to cut out the knot and treat the rest of the ball the same way as if you were joining in a new yarn or ball.
If you can it is neatest to make the join at an edge, but if you are working in the round or find the knot half way into a row of 200 stitches, you might not see that as an option. In which case you should stop knitting when there is 10 to 15cm of yarn to the knot. Cut the knot and then leaving another 10cm tail. Knit two or three stitches using both the tail of the “old” yarn and the “new” yarn and then continue using the new yarn only.
You can weave in the ends after a couple of rows or when you make up the piece.
Another option would be to cut out the knot and split splice your yarn instead of joining in as above.
Whatever approach you take, remember that knots are a rare occurrence and that they shouldn’t spoil you knitting.