It would definitely help if you just read the API documentation, but here is some sample code that should give you an idea:

<!-- language: lang-cs -->

    [TcmExtension("ExampleEventHandlerExtension")]
    public class EventHandler : TcmExtension
    {
      public EventHandler()
      {
        EventSystem.Subscribe<Component, SaveEventArgs>(ComponentSaveAction, EventPhases.Processed);
      }

      public static void ComponentSaveAction(Component subject, SaveEventArgs args, EventPhases phases)
      {
        // the TCMURI of the Publication from this item
        string contextRepository = subject.ContextRepository.Id.ToString();
		
        // the TCMURI of the Publication where this item was localized
        string owningRepository = subject.OwningRepository.Id.ToString();

        if (subject.IsLocalized)
        {
          BluePrintChainFilter filter = new BluePrintChainFilter(subject.Session) 
            { 
              Direction = BluePrintChainDirection.Down 
            };

          // the TCMURI of the Publication where this item was created
          owningRepository = subject.GetBluePrintChain(filter).FirstOrDefault().Id.ToString();
        }
      }
    }

If you need the same info via the Core Service see my answer to
http://tridion.stackexchange.com/questions/4520/how-to-get-the-owning-publication-of-a-component-via-the-core-service