Try doing a search on the forums, there are plenty of similar threads about - some of which have responses.
You haven't given us much information to go off really as there are different connection types (PS/2, USB, RS232 etc) which makes a big difference to how they are used.
If you can't find your answer via the other threads that you find in a search, post back a bit more information about your scanner (Make, Model, connection type) and we'll try and help.
@Debasisdas - At my last place of work, they used scanners with an RS232 interface.
These didn't work in the same way as the PS/2 and some USB scanners and we had to use an ActiveX control for the EPoS system to pick up the data from the scanner.
Most scanners are like keyboards in that way though - for people to be having problems, I'd like to think they've already tried using the scanner in that way first before posting although I'm probably right in thinking most posts are related to homework that they don't really want to put the effort into themselves!!