Machine Learning in FAST corner detector
But my question is how are they fitting this whole training and testing idea of machine learning, while are analysing real time video frame.


Your question is not clear, but I'll try to answer. They don`t analyze "real time video frame" with machine learning. What do they do:


They have slow segmented test == test all points around whole circle, if it looks like corner. No machine learning.
They want to do it fast, so to test not all points around circle, but only some of them. And they want to know which points test first to have answer. 
That`s why they take some training data and use "slow" test in it - to have ground truth. Then they train decision tree to approximate this "slow" test. 
Basically - you have (for simplicity) 8 points for test around circle. Each point can be darker, brighter or the same as central. Result of testing can be "corner" or "not a corner". 
Example. You test north point, it is "darker". You look for ground truth and see, that there are both "corner" and "not a corner" points with "darker" north point. Cannot decide. Then you test south point - it is also darker, then east and west - all are darker.You look for the ground truth and see that all points with this test results are "not a corner". 
Now you can answer "not a corner" with only 4 tests instead of all 8. So, you can save it as one branch of decision tree. The same for other cases. You find optimal way by some criterion and form full decision tree.
You or me use FAST detector - we don`t retrain trees, we just use ready ones to have it, so no machine learning in real time.