The use of commas with coordinating conjunctions, For And Nor But Or Yet So, is only required when they are used to join complete Subject + Predicate pairings.
That is, an English clause generally has two primary components: the Subject (the thing which is acting) and the Predicate (the action being taken by the Subject).
So, the sentence
can be broken into the following two components: "I", the subject, "walked", the predicate.
We can compound clauses with conjunctions to create compound sentences of, typically, two clauses maximum.
All rules are made to be broken in language, but aside from listing clauses with semicolons and other strange constructions, two clauses is what we all learned and try to adhere to.
(Brief aside: we also learned not to end sentences with prepositions, and yet I do it with impunity because the alternative would likely be awkward or confusing. All rules are made to be broken, when necessary...)
So, we can compound "I walked" with the fact that "I didn't get anywhere" as follows:
I walked, yet I didn't get anywhere.
The comma is strictly required here because there are two complete clauses with their own subjects and predicates.
Although not logically very intelligible, a grammatically equivalent sentence could be
The Monaco Grand Prix walked, yet Santa Claus didn't get anywhere.
When the subjects of two clauses match, or the predicates of two clauses match, we can combine them into a single clause.
Consider these two examples, one from before:
I walked, yet I didn't get anywhere.
AC/DC held a concert, and Fleetwood Mac held a concert.
In the first case, we can remove one of the subjects, and rather than compounding the two full clauses, just compound the predicates.
So the new sentence would be
I walked yet didn't get anywhere.
Notice that I removed the comma.
Even though it's the same conjunction, the comma is not required when joining two predicates with a shared subject.
However, the second example is somewhat trickier, when we try to form a compound subject in this case without altering the predicate, we subtly alter the meaning of the sentence because the subject changed from singular to plural, but an object in the predicate ("a concert") did not.
We can write
AC/DC and Fleetwood Mac held a concert.
Grammatically, this is a success, but it now sounds like AC/DC and Fleetwood Mac are playing together.
Note that there is no comma before "and", however.
We are free to combine AC/DC and Fleetwood Mac as a subject without a comma separating them.
It is easy to resolve this by altering the predicate itself to accommodate the change from a singular subject to a plural subject:
AC/DC and Fleetwood Mac held concerts.
There are many other easy examples like this, such as
Zeus fought, and Poseidon fought.
which could reduce down to
Zeus and Poseidon fought.
But that sounds like Zeus and Poseidon fought one another, which isn't necessarily what we meant.
That's also a trickier one to resolve, depending on what the intent of the sentence is.
So, the general rule is that if you have Subject + Predicate + Conjunction + Subject + Predicate, then you need a comma before the conjunction.
However, if you have Subject + Conjunction + Subject + Predicate or Subject + Predicate + Conjunction + Predicate, no comma should be used to accompany the conjunction.
There is a more complex case in which the Subjects or Predicates form a list, and in that case the normal listing rules for commas apply.
I walked, juggled, and sang.
requires commas to separate the list of more than two predicates, since "walked", "juggled", and "sang" are all complete predicates.
Likewise we do this with subjects:
Allison, Joshua, and Mark went for a drive.
Commas separate the listed subjects.
Note that I said "normal listing rules for commas apply".
There is a great deal of pointless argument over whether or not the Oxford Comma (comma before the "and" in a list) is appropriate here and various other places.
There are obscure examples with and without it which are disambiguated by adding or removing it.
Use it wherever you judge it to be appropriate.