You cannot download games for current consoles like Xbox 360, PS3 or Wii that way. What you can do is run emulators for older systems — N64, Dreamcast, Game Boy, PlayStation — which are programs that play game files on your PC.
The emulator itself is legal, but the game files are a different matter: downloading ROMs you do not own generally infringes copyright, so stick to titles you have purchased or to homebrew and freely distributed games.
For modern PC games, the straightforward route is a legitimate storefront such as Steam.