As its name suggests, Fartlek means playing with different speeds. Unstructured speedwork is a good all-encompassing term for understanding how fartlek works. You can use either time or distance as your metric. For example, if you are using time as your metric, you can choose to run 3 minutes at a greater effort/faster speed, and 5 minutes at an easy effort/normal pace. For distance as an example, you could do 500 meters at a harder effort/faster pace and 500 meters at an easy effort/average speed for 4 km.