For the regular lottery player, over 99% being luck with a fraction of a percent being game selection, numbers selection, and wager type / amount.
Back in the early days of lotteries, some attempted to play a very large percentage of combinations in games that featured jackpots well in excess of the odds. Ie. a $1 game with 1 in 1 million odds with a $5 million jackpot. Needless to say, lotteries most everywhere now require playslips to be filled out by hand.
Extended play games, such as Bingo, Crossword, etc, is another avenue in which some have likely come out far ahead by analyzing the uncovered numbers / letters on unplayed tickets to determine the likelihood of it being a winner. Lotteries and instant ticket vendors have taken steps to address this, but flaws likely still exist in some games. However, unless one has a lot of money to burn and/or is a lottery retailer with access to tickets, this is near impossible to game.
Speaking of lottery retailers and instants. They have a huge advantage, since they have physical access to the tickets and plenty of time to examine them for patterns (extended play games, in particular) along with tracking the losers and redemptions. While many players don't scratch in the store, some do and a very observant retailer can watch for streaks of losers and selectively play following tickets themselves, knowing that instant ticket packs are seeded with prizes in a predetermined fashion that can be gamed. Ie. a $300 pack of $1-$5 denomination will most often contain at least $140 or so in winners. Some lotteries even publish a guaranteed minimum.
In short, the easiest way to game the lottery is being a lottery retailer. Plus they receive ~5%+ commission on gross sales giving them an additional advantage over the regular player.