Set the rails and watch the zigzag. Don't know the count? “Try all” ranks every option.
Write the message in a zigzag across a number of rows, the rails: down to the bottom rail, back up to the top, and down again. Then read each rail left to right and join them. No letter changes. They only move, which makes this a transposition cipher.
With three rails, WEAREDISCOVEREDFLEEATONCE is written as
W . . . E . . . C . . . R . . . L . . . T . . . E
. E . R . D . S . O . E . E . F . E . A . O . C .
. . A . . . I . . . V . . . D . . . E . . . N . .
and reads off as WECRLTEERDSOEEFEAOCAIVDEN. Type into the tool above to see your own message drawn the same way.
The only key is the number of rails, and maybe an offset (where on the zigzag the first letter starts). That leaves very few possibilities, so “Try all” decodes with every rail count up to 12 and ranks them by how English the result reads.
If nothing reads, try an offset, or the “Keep spaces and punctuation” option if the ciphertext's spaces look like they were scrambled along with the letters.
All the right letters are there, in the wrong order. Frequency analysis gives it away: E, T, A and O are still the most common letters and the index of coincidence is close to English's 0.066, but nothing reads. Rail fence is the commonest transposition in puzzles. Columnar transposition and the scytale are the next things to try.
Write the message diagonally down and up across a number of rows (the rails), then read each row left to right. With three rails, WEAREDISCOVEREDFLEEATONCE becomes WECRLTEERDSOEEFEAOCAIVDEN.
Choose “Try all”. There are only a handful of sensible rail counts, so the tool decodes with each one and ranks them by how English they read.
Where on the zigzag the first letter starts. Most puzzles start at the top (offset 0), but some begin partway down. If nothing reads, try a few offsets.
Usually not. Classic rail fence strips spaces first. If the ciphertext still has spaces scattered oddly through it, they were probably part of the fence, so tick “Keep spaces and punctuation”.