I'm setting up a new raspberry pi, trying to figure out what I need to buy and what I can borrow. None of the tutorials I've watched have made this clear. Is the SD card just used to initially flash the board with the OS, or does it need to remain in the slot to store the OS indefinitely? I have Raspberry Pi 3.
The Pi has no (usable) persistent memory.
The SD card is used to perform the functions of the BIOS and hard disk drive of a standard PC.
I.e. it is used to boot, hold system software, and store any data used/created by your programs.
The Pi3 is different from earlier Pis in that you can actually use an attached USB hard drive instead of the SD card, but you do need one or the other.