IFERROR part is used to mask errors with blank("") which INDEX will throw up when all the values from source list are listed.
INDEX is used for returning element specified by row number, column number. Column number is optional. And it is omitted in above formula as we are dealing with single column.
Now to find out the rows where the condition is met and to list them sequentially the following construct is used:
SMALL(IF($A$2:$A$23>0,ROW($A$2:$A$23)),ROWS($B$1:$B1))
ROWS($B$1:$B1) gives 1 in first cell and generates numbers sequentially as 2,3,4,5,...as we go on copying formula down.The IF construct returns TRUE cases where the condition is met. So using this combination we get a series of rows where the condition specified is met.
Use Formulas | Formula Auditing | Evaluate Formula to see the workings of formula.