If your yo-yo string comes loose, you don't need to know how to tie a fancy knot to fix it. The most basic yo-yo string is comprised of a pair of intertwining strings that you can tie around your finger with a basic knot. Consider a slipknot instead to make sure the yo-yo is secure, making it less likely to become undone again.
Hold the loose end of the yo-yo string with one hand. Grab the string with your other hand a few inches down; the precise number isn't important as long as you give yourself enough space to form the knot.
Twist the string to form a loop. This isn't the loop that you'll stick your finger through when you're done, so you don't need to measure it precisely. Make sure it's wide enough to fit two fingers through and grab more string.
Release the string from your second hand, keeping the loop at the end of the string in your other hand. With the free hand, reach through the loop and grab the string you just released, pulling it through to the other side and forming a new loop.
Slip your finger through the loop and keep pulling the string until it's snug and comfortable. You don't want it so tight that it hurts or causes damage, but you don't want it so loose that it flies off when you swing the toy.