installing subwoofer to 2 channel system

I want to install a subwoofer to a 2 channel system.
How do I hookup a subwoofer? Do I need a home theater pre-processor or Do I use a 3 channel amp and hook 1 to the sub. I am a beginner here.
Depends on the sub. A suitable powered sub would have connections to take care of the interfacing with a regular stereo system.

For a two channel music system you don't need a home theater pre/pro at all.

You could use a three a channel amp, but that isn't the way I would approach it. Most three channel amps are designed for three of the channels of a home theater system and therefore usually have the same power rating. You'd probably want to separate the sub and its amp from the rest of your system's amplification, because it will have different power demands and most likely will require more current.

Your installation depends on the subwoofer you choose and the equipment you plan to match it with.

A sub like the REL is preferrably fed a signal via an included cable that connects to the speaker binding posts of your two channel amp and feeds the REL's sub crossover/amp directly.

A sub that accepts only line level input can be connected to a preamp that has two sets of outputs or by using a Y-adapter that divides the signal between a preamp with only one set of outputs and your two channel power amp.

Most subs come with a built-in amp and crossover, and will accept either speaker level inputs, line level and sometimes both.

Some people use a separate outboard amp and crossover with a passive subwoofer.

You have lots of options available to you. Do a search in the forums and have fun!