Android P's very first Developer Preview is here, and that means that eager owners of compatible Pixel devices can try out the latest and greatest that Android has to offer, if they're willing to go through a risky process to run risky software. To be clear, this is called Developer Preview for a reason, and you should not go into this expecting a rock solid build of Android. Features are still being finalized and bugs are still being fixed. All of that said, if you're still willing to give Android P a try, you'll need a Pixel or Pixel 2, or either of their XL siblings. The Pixel C, as well as all Nexus devices, have been left behind.
The first step is to get ADB and Fastboot working on your computer. How to do this differs from OS to OS, but if you Google your OS and "ADB and Fastboot," you'll find any number of tutorials and one-click tools. It may take some trial and error, but once you've got it fully working, you should be able to start up a terminal, type in "adb devices" while your Pixel of choice is hooked up, and see it listed. Once you've got that going for you, go into "About phone" in your settings app on the device, and tap on "Build number" until you get a popup saying that Developer Options have been enabled. Go into these options, and turn on USB Debugging. You can also turn on OEM Unlocking if you want to try out different ROMs or leave your options open, but it's not required to flash the Android P developer preview in most cases, can void your warranty, and can open the door to flashing the wrong thing and bricking your device. Note that doing this will wipe all data on your device and reset it to factory settings.
This final part can get tricky. First, head over to the Android Developers site by Google and download the correct Android P Developer Preview image for your device. Now, get your device into Fastboot mode, usually accomplished by powering off, and then holding a button combination while powering on. Once it's in Fastboot mode, hook it up to the computer and open a command prompt to the place where you downloaded your Android P Developer Preview image. You can open a terminal directly there in some environments, or you may have to use the cd command to find the folder. Once you've done that, use the cd command to actually go into the factory image by using its file name as the directory. Once you've done that, get an ADB daemon started by typing the adb devices command, then type in "flash-all" to flash it to your device. Do the same steps with an Oreo factory image from Google's site to go back to stock.