Let's break it down:
"The cat is running along the yard."
"Along" means parallel to or beside something.
If the cat is running along the yard, it suggests the cat is running next to the yard, possibly along a fence or border, rather than inside the yard.
"The kids are running across the lawn."
"Across" means from one side to the other of something.
The kids are running on the lawn, moving from one side of it to the other.
It does not mean "toward" the lawn. Instead, it means they are already on the lawn and moving across it.