First, the rights are rights to do what they want with your piece of writing. From the moment you set it down in writing, your words become a piece of property which you automatically own. The only value in this property is the Copyright (which gives you the right to sell it in any form, publish online or in print, adapt it to another form such as a film script, or pretty much do whatever you want with it)
Selling the rights is complicated: which rights do they want?
Think of your copyright as a pie, that can be cut into as many slices as you like - what slices do they want?
Rights are split into three main categories: Territory; Time; Media.
So first, what Territory do they want the rights for - UK and Eire? The whole of Europe? The world?
What time period: forever (In Perpetuity)? Five years?
What Media: Book? eBook? Film adaptation? TV adaptation? Serialisation and/or Sequel rights? Video game and other spin off rights?
Also, who has asked for the rights? What else have they done?
If they want the rights for no money, this is not legal. For a transfer of copyright to be legal, there must be an exchange of money (even if it is only £1).
Be aware that once you have sold the rights to all or part of your copyright piece, you cannot exercise those rights yourself or sell them to anyone else. So, for example, if you sell them the right to publish your work online in the UK for the next 5 years (after which rights revert to you, the author), then you cannot yourself publish it anywhere online, enter it into any competitions, or allow anyone else to publish it or part of it online.
If you have only sold the online rights though, you can still enter into a deal to have the writing published in a book or magazine that is offline. It may be less attractive to publishers though if it has already been made widely available online.
HTH.