How to prevent drafting?
In road racing there are lots of way to try and gain an advantage (or not to give others an advantage).  Because this is a friendly race, I will break it down into friendly, indifferent and hostile tactics. 


  Update 1: 
  The OP updated their question to make it clear that they were a beginner and the other rider was a more experienced road rider. So I have added a paragraph at the bottom discussing the importance of how a tactic or strategy is executed. 
  
  Update 2:
  A fun video:  How To Get Rid Of Wheelsuckers


1) Friendly tactics

These tactics are intended to keep the competition friendly by letting your friend draft, but with the intent of making a decisive move at some point to win, which will clearly demonstrate that you were the stronger rider on the day.


First over the line wins -  Simply put, keep the ride relaxed until near the end, then launch and maintain a strong attack that your friend cannot match.  This keeps them in the "competition" until the end, they save face by staying in until the end and you save face with your devastating tactic.  You can even let your friend take pulls to make it look fair.  The down side is that they may come away thinking the competition was closer than it really was.
Sustained Efforts: There are a couple situations where the advantage of drafting is reduced, you can then use these situations to launch a sustain effort in an attempt to ride them off your wheel, thereby gaining the advantage.


Climbs: As many others have pointed out, a significant climb is a good way to put distance on another ride.  Depending on how badly you want to rub it in you can control the distance.
False Flats: False flats are sections that appear to be flat but are actually have a slight incline.  If you do not have a computer that shows this (e.g., Garmin) the slight inclines can make you feel very slow.  Attacking with a sustained effort on a false flat is a great way to put a gap on someone, especially if you know it is a false flat, but they do not.



2) Indifferent tactics

These tactics are a little more aggressive than (1) and may be fair game depending on your friendship and views on competitive behaviour.


Surge Attacks - If someone is drafting a good way to shake them time a short attack where you can put a bit of distance and break their draft, thereby negating their advantage. 


Fast/Faster - For example you can ride at a strong tempo, wait to see if they are straining then do a short burst attack to gain a gap.  They will be tired from holding on earlier and now suddenly out in the full wind.  This will demoralize them greatly.
Slow/Fast - Similar to Fast/Faster you will be using changes in speed to break a draft.  In this case start to casually slow down, this will usually leave someone wondering what is going on... then attack to open a gap and break a draft.
Change direction and surge - If you change directions suddenly (e.g., zig or zag across the road, but no zig-zagging) while surging you can instantly remove the drafting advantage which can make it more difficult for the drafter to close the gap. (thank you @altomnr)
Catch them when they are sleeping  - Wait until there is a real lull in the "competition" to suddenly surge and break the draft.
Conversation to attack - At some point get into a friendly conversation, build a story and just as it starts to get really interesting (and your friend lets down their guard)... attack!  Catching someone off guard is a quick way to break a draft.

Using the wind:  If you live in a windy area and you know the route you can


Attacking into a headwind: this can be used in multiple ways.  One of the best ways is if you have an out and back course with a head wind on the way out, attacking a few km before the turn-around can be a decisive way to score a victory.
Guttering: If you get a cross wind (that requires an echelon in order to draft, you can ride next to the edge of the road to "gutter" the drafting rider.  Because draft position is effectively off the road-way and they cannot move off the road way into the draft they lose the ability to draft and have to do the same amount of work.  This is a good time to attack.

Repeat attacks: If you are in a lot better shape you can launch a series of repeat attacks in quick succession.  They may be able to hold on to one or two attacks, but stacking the attacks will eventually wear them out.


3) Hostile Tactics &amp; Cheating

Depending on how much you value your friendship (e.g., frenemies), there are also some hostile techniques that I have come across in races over the years.  I document them for completeness sake to indicate what should generally not consider as a strategy.


  WARNING: In no way should the "forcing an error" tactics be used against your friend as these tactics can potentially send someone to the hospital.



Forcing an error:


Attacking on technical descents:  If you are a more skilled descender you can use this to your advantage by encouraging someone to try and keep pace, thereby taking them out of their skill level. People will often over shoot corners and otherwise get shaken forming a gap.  At worse you may cause someone to crash and have an injury.
Overcooking corners:  Another horrible way is to deliberately overcook a fast corners so that you can just hang on, but with the intent of forcing them to go off the road or crash.
Riding into hazards: Another way to shake a drafter is take them into hazards such as pot holes, or riding within less of an inch of the side of the road.  The idea is to fake them into letting off.
Brake checking:  There is a special place in hell for those that brake check, but it is effective way to shake someone.

Using a vehicles wake.  If you are a stronger sprinter jumping into a vehicles draft for a period of time allowing you to surge ahead
Lie: While your friend is drafting casually say: "You know I am just not feeling it today... do you want to call it quits?"  Then while they are thinking follow this with a decisive strike.
Change the goal posts:  Near the end if your friend is still drafting suddenly sprint for a arbitrary close finish line.  Claim victory!  As an extension, in the post finish confusion, attack again to actually win.




The Importance of Execution

The tactics and strategy outlined above will rely heavily on execution, which can be difficult for beginners.  Many new riders will only partially commit to a tactic, holding back for fear that it might not work out. The "secret" is that once you decide on a tactic you really have to commit everything to it (i.e., willingness lose and look like a fool). Otherwise it is only a half strength attack which is easier for the other rider to survive. The more experienced rider will be practiced in the determination needed to knuckle down and survive an attack (even though they may be less fit overall).  This mental strength and experience can make them a formidable opponent if you do not fully commit to a strategy or tactic.

It can take time and practice for beginners to develop the "killer" instinct needed for success, so don't get discouraged if a chosen strategy doesn't work first time out. Sometimes you just have to keep throwing mud at the wall to get some to stick.