Create one Free Salesforce Developer org. Start writing code first then make it working. After that follow Apex Best practices to make your code clean. Then over the time you will learn about all best practices and why it needed.