Never done it myself, but I looked into it a while back... you'd need a gameplay capture device... you should be able to find them pretty easily with a search on Amazon (Elgato is a brand I remember seeing mentioned a lot at the time).
They all plug in to the HDMI cable, but beyond that their...