Connecting electronic components to the Pi is done via one or more of the pins in the so-called header. The number of pins has “grown” between the different Raspberry Pi board versions, but all recent ones have a 40-pin header. It’s of course important to be aware of the correct numbering to not correct components the wrong way.
The pins have different uses
Both 5V and 3.3V are available as power pins and, of course, also ground pins. Anytime the board is powered you have a fixed power supply available for your components. You have to take into account not to connect devices that need a lot of current, otherwise the Raspberry Pi itself will not behave as expected and reboot for instance.
The other ones are “General-Purpose Input/Output” (GPIO) pins. These pins can be addressed with software to act as input or output for an application. They use 3.3V, meaning an output pin will be set to 0V (low) or 3.3V (high) and an input pin will read 0V as low and 3.3V as high.
Most of the GPIOs have an internal pull-up or pull-down resistor which can be enabled in software.
The following image gives you an overview of the pins and types of a typical 40-pin header. Note the different numbers being used: