Minecraft wiki entry for Creating_behavior_packs, associated text: Launch the game
Create a new world
Set world to creative
Turn on cheats
Click on add-ons
Find "Tutorial Behavior Pack" in the list on the right and click it
Click play
Spawn a pig using the pig spawn egg from the creative inventory
Run 20 blocks or so away
Switch mode to survival by using the slash command: /gamemode s
Run toward the pig