Hello!
It really depends on the microcontroller.
Let's assume it's a recent device, then there is usually some non-volatile memory called flash
in the processor. Flash is used to store the program and can also be used to store non-volatile info.
Usually any processor maker also sells development board to promote its products.
I use essentially Texas Instruments processors (MSP430) and I could recommend the launchpad
series. Very cheap (less than 15 USD), and it's all you need to start. The development environment
is free up to a certain amount of program, but anyway big enough to let you do some quite advanced
programs.
To purchase a board, go to any online seller like Digikey, Mouser, etc...
To download the IDE, search for example Texas Instruments Code Composer Studio
What I said for Texas should be valid for any other maker. For example, there is a PIC32 board
called something like Pic32 UNO. It's a very complete system and in this case you should download
MPLAB X. For what I have seen, Pic32 has many libraries, but I think it's a drawback because you
don't really "see" what you do. For example, blinking a LED is done through some function of the
libs, but I think it's clearer if you can do something like PORT_X_OUT |= 0x01; to lit the first bit.
Dora.