1. With a comma:
* After working two hours, they were covered in dirt.
This option uses a comma to separate the introductory phrase "After working two hours" from the main clause "they were covered in dirt."
2. Without any punctuation:
* After working two hours they were covered in dirt.
This option is grammatically correct but less common. It's acceptable when the introductory phrase is short and the sentence flows naturally.
Ultimately, the best punctuation depends on the intended emphasis and tone of the sentence.