Practice and a straight up and down motion are usually people’s problems.
This question has been asked and answer several times in the past. In the future, please search for topics that might have helpful information, such as the following:
I didn’t try doing a Boing E Boing (after many failures) for a month and worked on other tricks.
When I went back to it I did it on the first try because my hand was used to the motion.
Now many people have been saying that there is an up and down motion, which is correct. However, I have found it easier to think about it this way:
Pretty much you’re almost pulling at the OPPOSITE direction that the yo-yo is heading towards so you tug it back. Are you pinching the string with your thumb and index finger?