This is a simplistic understanding of it.
A film image is analogue as in theory has infinite detail. The digital resolution will depend on the scanning device.
In practice it is complicated further by the type of film, the size of the individual salt grains (the light sensitive salt coating on the film) and the resolving power of the lens.
I have a 7200 dpi film scanner, I can scan at 40MP and with some films I still have not reached the limit of the film (particularly fuji's 'f' slide emulsions and velvia)
With fast grain films such as Ilfords Delta ISO 3200 it probably is a waste of time scanning at much more than half that.
Film also has an added benefit in that there is colour information present at each minute area of the scan, so even if a scan from a film camera was scanned at 10MP, it would still have 3x the colour resolution than a 10MP image from a digital camera ( most digital cameras have a bayer array type sensor, where a bit of guesswork takes place)
I scan my film at 16bit colour depth, most digital cameras take their images at 12bit or 14bit, if you shoot in JPEG mode then it is 8 bit, the more bits, the subtle the graduations between colours and shades as there are millions more availble.
Apart from that film also for the most part has a wider exposure latitude, wider and more subtle contrast can for fine detail can be sharper, as there is no need for anti aliasing filters etc.
For all that, I wouldn't film is the better choice for most, digital rightly has its fans, what it loses in quality it gains in convenince and ease of use.
In short film has far more resolution, far more colour depth and in the right hands will create better images than digital.
Technically. In lab conditions.
I love using both.
If you aren't getting great quality from your digital camera then please do a seperate post with info on make & model and settings etc.
These days, regardless of film being better or not, digital cameras should not be awful.