Watch linear search check each value in turn until it finds the target. Worked example on a row of 10 values, try your own array and target, with O(n) time.
About this algorithm
Linear search finds a value by checking the items one by one from the start until it meets the value or runs out of items. That takes O(n) time in the worst case, and it needs nothing from the data: no sorting, no index, no special structure. It is the simplest search there is, and the fallback when nothing faster applies.
Use linear search when the data is not sorted, when it is small, or when you will only search it once. Sorting first so you can use binary search costs O(n log n), which only pays off if you then search many times. It is also the only option for a linked list, where you cannot jump to the middle, and for conditions rather than exact values ("the first order over 100 dollars"). Binary search is the page to move to once the data is sorted and searched often.
Set i = 0, the first position in the array.
If array[i] equals the target, stop and return i. This is the first position holding that value, since everything before it has already been checked.
Otherwise add one to i and compare again.
If i reaches the length of the array without a match, the target is not there: return -1. Note that you only learn this after looking at every item.
The page rolls a new unsorted row of 10 numbers on each load and searches for the value in the ninth cell (index 8), so the scan runs most of the way along. Say the row is [42, 7, 93, 15, 61, 28, 77, 84, 50, 36]; the target is 50. The search checks 42, 7, 93, 15, 61, 28, 77 and 84, none of them 50, and finds 50 at index 8 on the 9th check. Searching that row for 99 instead would check all 10 values and return -1. You can type your own target to try both cases.
If the target is first, one check is enough. If it is equally likely to be anywhere, you check about half the items on average. If it is last or missing, you check all n. All of these except the first grow in step with n.
Time: in the worst case every one of the n items is compared once. Space: the only thing stored is the current index.