'Pit' is one of the oldest Latin loanwords in English — from 'puteus' (well), borrowed during Roman Britain.
A hole in the ground, especially one that is large or deep; also, a natural or artificial hollow or depression, such as a mine shaft or the stone of a fruit.
From Old English pytt (a pit, hole, well), borrowed early from Latin puteus (well, pit, shaft), which may derive from PIE *pewH- (to cut, prune, purify) or from a pre-Indo-European Mediterranean substrate word. The Latin borrowing happened during the Roman occupation of Britain (1st-5th centuries CE) — one of the oldest Latin loanwords in English, entering before the Anglo-Saxon migrations were complete. Latin puteus spread across the Roman world: French puits (well), Spanish pozo (well), Italian pozzo (well), Dutch put (well, pit). The English semantic range broadened from the original "well" to any hole in the ground, then to specialized uses: the pit of a theater
The word 'pit' in English has two completely unrelated origins. The 'pit' meaning a hole comes from Latin 'puteus,' but the 'pit' of a peach or cherry comes from Dutch 'pit' meaning 'kernel' or 'core,' borrowed into American English in the 18th century — making the two 'pit' words false friends sharing one spelling.