As the title asks, is it possible to guess a privkey/generate an existing wallet's privkey?
That depends. If the private key that you are attempting to "guess" was generated from a non-random source (such as a passphrase or faulty random number generator) and you know something about how it was generated, then it may be possible to guess or generate the same key.
I'm quite interested about how mining for a bitcoin address works.
I'm not sure what you mean when you say "mining for a bitcoin address". That isn't really a commonly understood concept, so it probably works in whatever way you want to define it since you're the one using the phrase.
Is it kind of the same thing as mining a block, guessing combinations of numbers and letters (the privkey) to unlock the code (wallet address),
That would be known as a "brute-force" search for the private key. It is a waste of time and money to attempt such a thing. You could run a million computers for a million years and you still wouldn't randomly generate the private key for any address spcifically chosen ahead of time.
or is it some other kind of algorithm?
If a private key is generated in some non-random manner, and you know something about how it was generated, then you could limit the search space based on your knowledge. This would allow you to build an algorithm around what you know about how it was generated.
I've used vanity miner before, and I've tried guessing an existing address, but according do vanitygen, it takes more than a billion years on average to solve.
Yes. Much more than a billion years. It isn't going to happen.
Assuming I was lucky enough to mine the exact same address, could I get the privkey?
Yes, if you got the exact same address, then you would have one of the 7.9 X 10
28 (on average) working private keys for that address.