The other answers are correct, but I want to add that it is an old-fashioned or formal-sounding phrase. Sometimes it is said like "I'd best be going", which means the same thing. The phrase you hear more often (at least in U.S. English) is "I'd better be going/get going", and it also means the same thing, but sounds more natural.
I also think it sounds more polite because it makes it seem like the speaker is leaving because they SHOULD, not because they necessarily WANT to. If you tell someone "I'd better get going." it sounds like "I would like to stay, but I should go."
I hope this makes sense! If you have any questions please ask and I will try to explain!