Generally you can squirt some liquid lube in the pedal axle and it eventually wicks its way to the bearings on the inside. However this won't do much for bearings on the outside end of the axle.
Some pedals can be disassembled for servicing and ball replacement, depends totally on what your pedals look like.
We can tell you more if you post a clear sharp photo of the pedal.
The easiest solution is to buy a new pair of pedals and swap them over. You'll need either a hex driver or a special thin spanner of the right size, and to know the left side pedal is threaded backwards. Or a bike shop would throw the new pedals on for nothing or very little cost.
You may also find that squirting some sort of lubricant into the pedal may also work loose any grit or muck that has gotten into the pedal - if that is the case, then simply keep squirting lubricant into the axle area of the pedal until it runs clear and then get the pedals replaced as soon as possible or repack the bearings with grease (otherwise it will keep occurring and the pedals will ultimately fail).