These days, 'dibs' is most often a performative utterance used to lay claim to an object. "Dibs on the chocolate" means that you get to grab the chocolate before anyone else -- and if everyone respects the calling of dibs, this will mean that a nasty scrabble over the chocolate has been avoided. Dibs can also be called on a place ("dibs on the front seat!") or position or role ("dibs on catcher!"). Or on anything else, really. Dibs is most commonly used by children, but is a well-ingrained part of Anglophone culture, and it is not uncommon for adults to call dibs.
The origin of dibs to mean 'an advance claim to something' is a mystery. One favorite theory is that it comes from the game of dibstones (jacks), in which the playing pieces were known as dibs. However, the American slang term dibs was first seen in print in 1932. This is about 30 years after the last rare uses of dibs in reference to the British game of dibstones. There isn't any record of British children using dibs as a slang term in that time - they were using the term 'bags'.
The next best theory that dibs derives from the words division or divide (divide, div, dib, dibs). This works, it doesn't leave a time gap, and it fits in with the way many slang terms are created. But there is no direct evidence for it.
Depending on where you live and the situation you are in, you may use the term 'bags'/'bagsie', 'call' ("I call first spot!") or 'hosey'; 'shotgun' and 'fives' are closely related.