if your strokes and timing are good with a ball machine, but not when practicing with someone or in matches it means that you might not be adjusting your timing to balls of varying speed. this is a skill you need to develop. how to adjust your timing depending on the incoming ball and on what you want to do to it.
there are many ways of adjusting to the incoming ball.
- you can wait for it to come into your hitting zone (delay dropping the racquet on slow balls), or
- you can attack it early by taking a step or two forward before going into your stroke motion, or
- you can step back and then hit it (useful for high balls on clay) or
- you can run around where the ball is going to be and hit it with the other stroke (i.e. change backhand to forehand and hit inside-out), or
- you can hit it out of your normal strike zone (higher or lower) and adjust the height of your take-back and stroke accordingly.
Disclaimer: I'm NOT a coach...
Real tennis: https://www.youtube.com/watch?v=yDqnkLJ9BtM