Just like horses, pigs are rideable in Minecraft. However, you’ll need a saddle to do so, and surprisingly, those aren’t craftable in Minecraft, so you’ll have to find one. You can find saddles in chests, by fishing (only a 0.8% chance), by killing striders and ravagers, or by purchasing them for 6 emeralds each from a master-level leatherwork villager.