When building a fire in any weather condition you need some kind of starter. If you are expecting to experience wet conditions a great planning step is to store some starter in a waterproof location. If you don't have any household material, then gathering kindling and storing that will work. When backpacking I keep a small water-proof cylinder with a lighter, 2-3 strike anywhere matches, and some tightly rolled newspaper.
You'll also need larger pieces of wood to sustain the fire. Eventually your fire will be able to handle wood that is slightly damp, but you'll need a few decent pieces of dry wood to build up a base of hot coals that can then be used to help dry wood later. The best way to accomplish this in wet conditions is to look for naturally piled up wood or big thickets. Underneath a fallen tree can be a great place to find some medium sized sticks that have been shielded from the rain.
As for starting the fire, you will most likely need some kind of cover. The amount of cover depends on how bad the rain is. At a minimum you'll need good cover when starting the fire, and depending on conditions you may be able to fully uncover your fire once it is started. This is where all the big warnings need to be posted though! The cover over the fire could itself catch fire, creating a dangerous situation. The cover could block fresh air, which obviously is dangerous around a fire, not to mention bad for the fire as well. The few times that I have needed to start a fire in a very light rain, I simply used by body as cover for the kindling, and once that was going an occasional drop of rain wasn't a problem, never tried in a heavier rain though.
The last item I would mention is placement. Especially if you are quickly getting your fire going as rain starts, make sure to pick a place that will not get washed out if the rain intensifies. If you are using a fire pit this shouldn't be a concern.