When you get a new Apple device and turn it on for the first time, you generally step through a simple on-screen setup process. During the setup process, there is an option to create an Apple ID if you don’t already have one.
Alternatively, you can create an Apple ID at any time by going to this website.
This article provides additional details.
Posted in: Apple ID