What is the high level procedure to use ECDSA? I want to make a computer program to sign and verify some message using ECDSA.

There are some computer libraries but I'm having trouble using them, as I don't understand ECDSA.

What do I need theoretically?


Is ECDSA the same as other digital signing that I calculate hash of message, encrypt the hash and append it to the original message? 
In ECDSA can I choose hashing function and some encrypting parameters? What I need to know about generating pair of keys? What else do I need to specify.


NOTE: I don't need to implement ECDSA algorithm, there are libraries for that, but what I need to know what are the variable parameters in the algorithm.

EDIT: Here is a note from the library:

sign = crypto.createSign('SHA256');

privateKey = getPrivateKeySomehow();

sign.write('some data to sign');
sign.end();

sign.sign(privateKey);
// Prints: the calculated signature using the specified private key and
// SHA-256. For RSA keys, the algorithm is RSASSA-PKCS1-v1_5 (see padding
// parameter below for RSASSA-PSS). For EC keys, the algorithm is ECDSA.


Does this mean I have to specify a hashing algorithm and also generate a pair of EC keys?
Is ECDSA the same as other digital signing that I calculate hash of
  message, encrypt the hash and append it to the original message?


No. From a user standpoint, you give the ECDSA module the message, it will hash it internally and then do some black magic with it (which includes drawing a random number) and output you a signature. If you want to test if your implementation is decent, ie does the hashing by itself, take a long message (like a couple of kB long) and give it to the function. If it "just works" then it is hashing, if not, well then it is not hashing.


  In ECDSA can I choose hashing function and some encrypting parameters?
  What I need to know about generating pair of keys? What else do I need
  to specify.


Theoretically you can choose the hashing function, practically things may get a little more difficult with SHA1 and SHA256 being the standard options for ECDSA (despite SHA1 being broken).

Key generation is straight-forward. You pick one of the named curves your library provides (preferably the number in its name should be larger than 240) and then call the function to generate the key. This function will then generate the public / private key pair for you, by drawing a random number and doing an operation known as "scalar multiplication". Do not try to generate a curve yourself, this is really hard to do. The "larger than 240" limitation should give you a curve with 120-bit or more security which is sufficient.