The private key is a random 256 bit number. Every 256 bit number is a private key, but some are safer than others. You should use the strongest entropy source that you can get your hands on to generate them.
The public key is then simply pubkey = G * PrivKey. The catch is that * is EC multiplication in the appropriate modular elliptic curve field and G is the base point of that curve.
From there, it is just a matter of hashing and encoding to generate the address