Whether this is legal depends entirely on what you're copying. Burning a game you own for personal backup is generally fine, but downloading and distributing a game you don't have the rights to is copyright infringement.
If you want a legitimate copy, buy the game from an authorized retailer or digital storefront, then follow the official installation instructions. Many modern titles are digital-only anyway, so a physical disc may not even be part of the process.