There are 4 kinds of resources in the game: energymineralspower, and commodities. Resources can be harvested, processed, traded on the market, carried by creeps, and stored in structures. All resource kinds have different purposes, and you start playing only with access to the most basic one: energy.

Energy

Where to get: a Source in almost any room.

How to get: send a creep with a WORK part and harvest it.

Needed for: spawning creeps, building structures.

Energy is the main construction material in the Screeps world. Your base works on energy, so harvesting plenty of it is vital for any colony. You can harvest energy not only in your home room, but also in other rooms remotely to increase energy income.

Minerals

Where to get: a Mineral in almost any room.

How to get: build a StructureExtractor, send a creep with a WORK part, and harvest it.

Needed for: boosting creeps' capabilities, and also for producing trade commodities.

By mining and processing minerals, you can significantly speed up your economy and boost the effectiveness of your creeps.

Working with minerals consists of 3 steps:

Harvesting

There are 7 types of base minerals shown in the picture below.

https://docs.screeps.com/img/minerals-01.png

Each room contains only one mineral type, so in order to handle them effectively you need either access to several suitable rooms or trade relationships with other players.

https://docs.screeps.com/img/mining_minerals.png

A mineral deposit is located in a room at a spot marked by a special symbol. To start mining the deposit, you need to construct the special structure

Extractor

on top of it (available at Room Controller Level 6). Upon building it, you can start applying the method

harvest

to the deposit thus mining the corresponding mineral in the same way you harvest energy.

Mineral compounds

Base minerals are useless on their own. In order to impart some useful capabilities to them, you have to combine them according to special formulas in the structure called Lab.

https://docs.screeps.com/img/minerals-02.png