Yes, a game that advertises compatibility with Windows 98 or Windows 2000 will very likely run on a computer with Windows XP. XP was designed with strong backward compatibility for older software.
In most cases the game will install and play without issue. If you do run into trouble, running the game in compatibility mode, an option built into XP, can help smooth things out.