There are many STAs(Stations) connected with a single AP. My question is how does a STA knows about other STAs that are connected to same AP. For example in Windows when we click Network icon we get list of other Computers which are connected to same AP. So basically which frames are exchanged between a STA and AP to get list of other connected computer to same AP?
It's the same as on a wired Ethernet LAN. There's nothing wireless-specific.
Windows generally uses SMB browsing and NetBIOS Name Service and Link-Local Multicast Name Resolution.
UPnP has some discovery mechanisms too, which I think involve putting a weird HTTP GET into a UDP message and multicasting it.
The IETF standard is ZeroConf, which Apple calls Bonjour. It uses Multicast DNS (mDNS).
Cisco devices use the Cisco Discovery Protocol (CDP).
A protocol called Link-Layer Discovery Protocol (LLDP) has its vocal fans, but I'm not sure how widespread it is. Unlike most other discovery protocols, with LLDP you can discovery the topology (logical map) of your network, but I don't think LLDP is as good at discovering what application-level services are being offered by each device.
Many other discovery protocols have come and gone, and many are still around, but only used by one company or product or protocol family.
Well, to be fair and complete, I should mention that Wi-Fi Direct (the Wi-Fi Alliance's way of doing 802.11 point-to-point without an AP, as used by the Wi-Fi Alliance's "Miracast" wireless screen mirroring technology) does have a wireless-specific discovery protocol. As I recall, Wi-Fi Direct-capable devices spend some amount of time sending out special beacons and responding to special probe requests with special probe responses. Other Wi-Fi Direct-capable devices can find them by doing a channel scan much like how a normal STA finds an AP.