You might start with thinking about what typical DNA strings might look like, if you were to generate a set of strings at random.
For example, the simplest model might look like a 1/4 probability of seeing each base at a given position of a motif. To generate a random sequence of length n, roll a fair four-sided die n times, etc.
Using this model to generate a set of randomly generated strings, you might ask how often you expect to see your motif by chance, based on the frequency of strings you'd expect to generate.
In reality, the underlying biology shows dependencies between bases in areas of the genome where transcription factors bind, such as promoters. So more complicated models like, say, heximer frequency or GC content can be used to generate a more biologically relevant background set of sequences.