This works in much the same way as when you are offering a player a contract to sign for your club, with the key difference that, if talks break down, you'll still have the services of the player until his agreement expires.
At the start of the season you'll be notified in the news that some of your players are in the final year of their contract. It pays to tie up a deal for those you wish to keep as soon as possible, to avoid the prospect of a valuable playing asset being released from the club without you receiving a transfer fee.
Similarly, if you have a player you are desperate to keep a hold of, it might be wise to offer him a deal before big teams get wind of his ability or he becomes keen to move away from the club.
The player will indicate what kind of deal and salary he is looking for and it's up to you to negotiate from there. Don't be too hasty to offer a hugely generous deal however, as you will be able to take more time over a player's contract when he is already signed to your club. Rivals will obviously then be unable to offer him a deal until six months before his contract expires. Mess the player around too much, however, and he is bound to become unhappy.