Power can be obtained from batteries, generated by spacecraft with built-in Solar Panels, or supplied from other spacecraft or modules.
You can access the power menu by selecting the power view (shown by lightning) from the view menu in the top left corner of the screen. There, you can turn the power on or off, turn on/off power switches between connected spacecraft/modules, and view the power being generated, used and supplied to other spacecraft.
To transfer power between spacecraft/modules, you must dock the spacecraft together, select the power view, and toggle the switch. All spacecraft with enough solar panels will generate the power they need and will not need batteries to maneuver.
Docking and Un-Docking, Cargo transfer and Air and Fuel valve controls do not require Power supply to be performed.
Tutorial 9 teaches you about power management in the game.