How is the bandwidth shared among the users?
Arbitrarily.. Usually. Unless your AP is doing some intelligent per-user limiting, it's pretty much just shared equally.
Furthermore, how many users can be served by a single access point
using 802.11g in an environment with low interference, and average web
activity from the users?
This depends greatly on which access points you're using. If it's a Linksys or Netgear thing for consumer use, you're often lucky to get 5-10 consecutive connected clients.
On the other hand, if it's a high-end enterprise wireless AP, you could be looking at 50-100 connected clients.
Xirrus APs can support between 250 and 1920 connected clients with the really large radio arrays, depending on the specific device.
The goal is to use bandwidth limitation to avoid starvation for some
users in case some of the users start to download a file or stream HD
video or some other bandwidth intensive activity.
That's called Quality of Service, and you'd need to configure it on the Access Point (and on the router and other network devices). You'd typically configure rules to rate-limit traffic to certain ports or destination IP addresses. The complete answer for this is out of scope for this question, and is more then adequately explained by various articles on the topic, as well as the documentation for your specific Access Point and router hardware.
Certain Wireless AP solutions provide a management interface which has pre-defined classes of traffic, such as "Youtube" and "Vimeo" and also classes such as "Social Media" and "Video Sites" which you can use to rate-limit all traffic to these sites.