At its simplest, test works in the same way as contains, returning true if the search string is found in the value. It is also case-sensitive.
test
contains
true
test( "bensomething", "ben" )
What makes test much more powerful is the ability to use regular expressions in the search.