You need to create custom timer job to achieve this. This article will help you to get started.
public override void Execute(Guid targetInstanceId)
In above method you will write your custom business logic. In your case sending reminder email for product which going to expire. It will start when product is going to expire in 3 months. You can check condition if Today's date and expiry date is less than 3 month it will sends an email. And timer job will run every month.
Next you need to create feature to register this timer job.
FeatureActivated will help you to register when feature is activate.
For monthly schedule you can use below code
SPMonthlySchedule schedule = new SPMonthlySchedule();
schedule.BeginDay = 1;
schedule.EndDay = 1;
schedule.BeginHour = 10;
schedule.EndHour = 10;
schedule.BeginMinute = 45;
schedule.EndMinute = 59;
This will run timer job on 1st day of every month. between 10.45 to 10.59 time.
Hope this helps !