Adding a faction to the player is actually really easy with the scripted command SetFactionRank. But I think you're after something much more - like creating a questline to join some group much like the Mages Guild or Dark Brotherhood.
Factions in Oblivion aren't necessarily guilds - they're more like "flags" for NPC's/creatures with something in common. For example, all deer are in a faction that prevents most other creatures from attacking them. Many shops and houses also have an associated faction so that their owners/inhabitants won't be trespassing or stealing.
To get started, start on one of the questbuilding tutorials such as at http://tesalliance.org/forums/index.php?/forum/81-the-enclave/ or the http://cs.elderscrolls.com/constwiki/index.php/Category:A_beginner%27s_guide and use the SetFactionRank script command to raise the player's rank at the appropriate times.
Such a questline with a lot of dialogue can be very complex so it may be a difficult journey if you're just starting out in modding. Perhaps starting with something small with minimal dialogue (buy a house, become its owner, get added to the faction) might be an easier way to start.