There is no definitive answer to this question. We'd say it takes a combination of skill and luck. Table games like poker and blackjack require skill. You'll need luck more than anything else when it comes to slots.
You'll need luck to win all kinds of games in online casinos. Whether you prefer slots, tables, cards, or live dealer games, luck significantly determines how much money you win. We strongly advise you to try out the no deposit games. They will increase your chances of winning. This will give you an idea of what to expect and make things easier when you play for money.