Yes, you will need a rim tape to protect your inner tube from the spoke holes or the spokes in your rim. There are a few exceptions we come to later.
The rim is the outer part of your wheel. Along its or circumference run two flanges to hold the tyre in place. Between the flanges is the rim bed. A rim tape usually needs to be in this bed. Thus can be a glued cloth tape, a strong adhesive tape, a strong elastic tape, or a rubber strip.
Often the rim profile consists of a chamber. It's one end is the rim bed and the other the inner circumference of the rim. The latter has drilled holes for spokes and nipples. The former has wider holes to access the spokes.
Purpose of the rim tape is to prevent the inner tube from expanding into these holes. The rim tape has to be quite strong to prevent this under pressure.
The tape should also cover the whole width of the rim bed. This keeps it from sliding.
If the inner tube expands into the holes it may burst. Either for being over-strained or by rubbing at a burr from drilling.
Some rims have only one chamber. This was especially common in the days of steel rims. Here the inner tube may be protected by a soft strip of rubber from chafing at nipples.
If a rim has no spoke holes you do not require rim tape to cover the holes. However, it provides an insulating layer to protect the inner tube from heat coming from the brake track. There are plugs available to cover holes, where the same may apply.
Another exception are tubular tyres that are glued to the rim. But these are only found in sophisticated race bikes.