Based on your comment above, I think you'll be interested in cross-correlation.
The basic idea is that you have two vectors (one of length m and one of length n, where n is usually much smaller than m) and you create a third vector (of length m - n) whose values represent how well the smaller vector matches a portion of the larger at particular points.
The basic algorithm is something like:
for i = 0 to m - n
output[i] = 0
for j = 0 to n
output[i] = output[i] + (v0[i + j] * v1[j])^2
The index of the maximum value in the output vector is where the smaller input vector best matches the larger.
This naive implementation is quite slow, but in the Properties section of the above link, we see that we can use FFTs to calculate the cross-correlation much faster in general.