Power can be taken from batteries, generated by the spacecraft, or supplied by 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 spacecrafts 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 doesn't require Power supply to be done.