If you're already running Windows 8, you can update to Windows 8.1 in the Windows Store for free. For more info, see Update to Windows 8.1 from Windows 8.
If you’re running Windows 7, you can buy and download Windows 8.1 using Windows 8.1 Upgrade Assistant. In Upgrade Assistant, you'll have the option to install Windows 8.1 now, later, or using media with an ISO file or a USB flash drive. For more info, see Upgrade to Windows 8.1 from Windows 7.