Practice, probably.
Go somewhere quiet, where you can ride round easily - a very quiet residential area, or a big empty carpark or something.
Start small. Take one hand off the bars, just a little bit, for a second. Then for longer. Build up to being able to ride one handed, then practice moving the hand away and up to signal - do it gently and slowly, so as to keep your balance. Concentrate on keeping the arm you still have on the bars nice and steady to stop you wobbling, and look ahead, not at your raised hand.
Repeat with the other hand, of course.
Once you can ride along with either hand out, you've cracked it, but it might still be worth practising turning with one arms out, braking one handed and so on. Also, when you're doing it out on the road, keep a good eye on the road surface so you don't hit an unexpected pothole while one handed.
It'll come.