by trial and error

definition: in an empirical manner
example:
speech part: adverb
synonyms: empirically

How by trial and error is being used?