If you are refering to having a computer play for a human ... one way would be to create a screen scraping application. The application would take in the chess board, decipher it into a chess board state, then performa some artificial intelligence to generate the next move.
If the yahoo chess is an applet it could be possible to break into the applets sandbox and retrieve the game state directly instead of screen scraping.
DeltaCoder