They all mean roughly the same thing, but are generally used in different contexts as they have slightly different meanings.
Get is the one that could be used most generally, and any time you go from not having something to having it, you could say you 'got' it.
I got an A in my report.
Can you go to the shop and get me some cereal?
Obtain is a little more formal, but could still be used in those contexts. I think if the object in question was a proper noun, obtain might sound a little unusual outside of business contexts:
I obtained a box of cereal at the shops this morning.
It still works, but it sounds a bit odd. Obtaining an A in a report, however, sounds reasonable.
Fetch isn't really the same as the others, as it usually refers to going to get something specific and then taking it somewhere.
Could you fetch me some cereal?
It has the act of bringing it back to the requester built in to the word. In programming contexts, it's a little different, but I don't know too much about that.