Open your crafting table (or crafting grid in your inventory)
Place 4 Iron Ingots in the four middle squares of the grid (top-left, top-right, bottom-left, bottom-right)
Place 1 Redstone Dust in the center square
Take the Compass from the output slot
