What is exactly a framework?

I am fairly new and I started to look into STM32 MCU:s and I was looking how Platformio deals with such MCU:s. I bumped into this example and it looks like “pure” Arduino code, in-spite the example is supposed to be for STM32 boards.

However, looking at the platformio.ini, I read:

[env]
platform = ststm32
framework = arduino
[env:nucleo_f401re]
board = nucleo_f401re

Does the framework means that I can use a certain API for another board?
For example, if I would have something like:

[env:uno]
platform = atmelavr
board = uno
framework = stm32cube

would that mean that I can write code for Arduino Uno boards using something like HAL_GPIO_WritePin(GPIOD, GPIO_PIN_3, GPIO_PIN_SET)?

Arduino is programing framework, and you can program lot of different microcontrollers with it (ESP32 /8266, ST32, ATmega328P etc. ).

No, HAL libraries are for STM32 / arm architecture…