How and when candidates appear on the ballot depends on whether the election is a Primary or General and whether the office is nonpartisan.
In a Primary Election, the order of candidates on the ballot is randomly determined by lot drawing after the close of business on the last day of filing week (RCW 29A.36.131).
Nonpartisan elections, such as city council or school board, will appear on the Primary Election ballot only if three or more candidates file for office. Some exceptions exist, for example Park and Recreation Commissioner and Cemetery District Commissioner positions don't have primaries. Some judicial positions also have special conditions.
The candidate receiving the most votes during the Primary Election will appear first on the General Election ballot. If no Primary Election took place, the names will appear on the General Election ballot in the order determined by the lot drawing (RCW 29A.36.131).