One learns things in many different ways both formal and informal. For example, if you went to an art gallery, you might learn that a certain painter (let's call him Van Gogh), painted a certain painting (let's call it 'Sunflowers'). You did not necessarily go to the art gallery with a view to learning this but it was a result of your visit. Studying is more formal and deliberate. So if you take a course, say in Art History, you would be studying Art History and you might learn that Van Gogh painted Sunflowers. This time your learning is the result of a deliberate attempt to learn about Art. Of course, you don't necessarily have to take an external course to study something - you can study by yourself as well. But the point is that studying is deliberate and targeted while learning can be result of many different actions (including studying!).
They are often interchangeable, but to learn is more general and to study is mostly the activity students do before an exam.
For example:
I've learned to swim, my brother taught me in the summer holidays.
Here you would never say: I studied to swim.
For example:
I have to study since I have this math exam tomorrow which is very difficult.
Here you would never say: I have to learn.
I think learn means . . . Trying to know something that you don't know,
But Study means . . . Trying to review & practice something that you already know,
to prepare yourself for an exam, or to add it to your skills,
Finally, maybe I am just wrong . . . Best of luck :)
One more example:
You learn a skill. You study a book.
Hence:
I learn how to drive.
I study the book with traffic rules.
I think the two words mean the same.