BB handguns can be battery powered, the higher grade versions use a micro battery and fit a compact, full metal gearbox into the handle. They don't recoil with each shot and give more consistent power in cold weather over gas blow-backs and need less maintenance making them a great choice for the beginner and intermediate airsofter.
The budget option are good old fashioned spring action guns, they have comparably few components with a simple mechanism that requires the user to manually compress the spring before each shot. This is usually done by pulling back the top of the body, although revolver types use the hammer as the compression lever. This manual cocking action means a lower rate of fire so most are bought for target shooting.