This question is quite wide. As a start, check out the beaglebone page where there is a blinking light program walk-through.
That is a simple program in one programming language as an example.
As a beginner, perhaps it is best to first start with this raspberry pi online magazine.
The concepts will translate to BeagleBone Black.
One main reason for the Raspberry Pi was to help people learn software programming, so you should use those
resources to help you.