Filter design is an art, in part. You come up with a filter to amplify certain features in your vectors or matrices.
For instance, say I'm looking for local peaks in the vector, i.e. a value that is greater than its preceding and following neighbors. On the next figure the local peaks are 5,7 and 9 (blue line).

In fact, the blue line was generated randomly with MATLAB:
>> u=rand(1,10)
u =
0.8416 0.7342 0.5710 0.1769 0.9574 0.2653 0.9246 0.2238 0.3736 0.0875
I could try a filter [-1 1 -1], the idea's that the value in the middle is larger than the values before and after. So, I'll be suppressing the edges and amplifying the middle. I'll be applying this filter as a moving window starting from the start to the finish of the vector:
>> v=[-1 1 -1]
v =
-1 1 -1
>> y = conv(u,v,'valid')
y =
-0.1767 -0.4347 -0.3599 -0.2702 -0.5382 0.2119 -0.9628 0.1713
I'll plotted the convolution result y in red on the chart above. As you see points #5,7 and 9 are the greatest in magnitude: my filter found the peaks in the sequence. If next you apply the max pool, you get the point #5. That would be the most likely location of the feature in the vector if there is one present at all.
Did I really explain how to create filters? No. That would be too much for an answer here, but hopefully you got an idea of the intuition behind them