This is called "the word problem", and it is hard. In some finitely presented groups it is actually undecidable. Of course, for finite groups you can always check by hand or write algorithms that terminate, giving you an answer. But it is not much different from "writing down the group as a table" (and in fact it is harder than that).