I have a project where I need to use OpenCV to detect an object (Tennis Ball) on a webcam, and for bonus credit, track it when I roll it across the table.
I haven\'t
Did you try to google your question? There are many info about that.
Simple idea is next: detect your object using color thresholding (it seems that it's yellow or white color) and circle detection. After ball is deteccted you need to just track it using (for example) Lucas-Kanade method.
Here are some guides/manuals:
samples. There'are many very useful examples. In your situation the best example is samples/cpp/lkdemo.cpp.