Did the medication come with any type of applicator? Some yeast infection medications come with an applicator that you put the medication into, and then you place the applicator into your vagina and insert it almost like you would a tampon.
If not, it may be slightly more complicated to put it in. Look on the package and see if there are any temperature guildlines (sometimes medication cannot be really cold or hot or it will become ineffective). If not, placing it in there may help a bit.
A homeade remedy to treat yeast infections is to use plain, sugarless yogurt. The live cultures help to even out the pH and sort things out. You can fill up an empty tampon applicator with it and put it in the freezer. It will fight the infection and feel cool and soothing when you do it.
If both these methods fail you and seem to be too tough, I would try buying another brand of medication that comes with an applicator or take oral medication to treat it. Your doctor can prescribe you the oral medication.