Another way
make a blend of 2 squares like Barbara has done above
drag the single column into the brushes panel
In New brush choose Pattern brush option
set corners (red pointers) to Auto Between
scale, maybe to 10
OK

1 Draw a line (the length of the image etc) with a stroke no fill
2 In Brushes click to apply new brush to stroke
3 Add a rectangle below black fill no stroke fill
4 move rectangle up up to cover the lower black line
select both the line and the rectangle Object > Group

Add photo , make sure its below Black pattern
Select
Object > Arrange >Send to back
Select both image and pattern
open Transparently panel
Click make mask

toggle between clip and invert mask settings until it looks right

I understand you are just learning and there's many steps, but sadly that's often the case in Illustrator with no one touch button