I recently got a ADSL modem with Ethernet ports for providing Internet to more than one client, So how can i tell my ADSL modem is acting as a switch ,router or hub. The function that I have noticed is that it assigns IP addresses to clients as they are switched ON kindly help calirfy.
A router connects two networks with different address spaces, eg an internal private network vs the internet, or two internal networks (two sites perhaps, or to keep servers separated from other systems on the network). Hosts on one network cannot directly reach hosts on the other so they relay their traffic via a router, which passes it along to the target host - or to another router along a chain to get to the other end.
If you have an internal network connected to the internet, you must have a router, or a modem attached to a computer which acts as a router (eg using "internet connection sharing").
Strictly speaking, if you connect two networks of different media types, you are using a bridge, so in most cases these things are really bridging routers or "brouters" but almost no-one cares anymore, so colloquially "router" alone is fine.
While many routers also provide IP addresses via DHCP this is not a feature of or distinguishing characteristic of a router. That just means someone stuffed some extra functionality inside the works to make it more user-friendly to get a network started up.
The ethernet ports are almost certainly switched in a modern device as Garrett said. Hubs are way old school and tended to be standalone devices - I have not come across any ADSL routers with built-in hubs.
So you have a router and a switch, wired back to back in one box*. Chances are it is also a basic (or possibly fairly clever) firewall, so three in one. You say it also has a DHCP server function giving out IP addresses, so that's 4. It might also have a web-based administration console, so that means it is a web server too (albeit of very specific functionality). And could potentially be a wireless access point as well. It's not one or the other, it is probably 2, 3 or even all 6 of those things in a little box for about $50. Pretty amazing really.
*I don't mean literally wired, this could even all be one silicon chip now, I'm being figurative.
It is very unlikely to be a hub as they have been almost entirely super ceded in the market by switches due to the performance advantages and their lack of any drawbacks in comparison.
If it is assigning IP addresses (via DHCP more than likely), this means the unit is a router as switches are not capable of this kind of functionality on their own.
@AdamV's answer is very good. I just want to comment on how one can tell by appearance.
A true, dedicated, standalone router-only will have 2 ethernet ports and generally no more than this. A business/professional class router will also have some other port labeled "Console" or similar. A web administration panel may exist.
A switch will have a number of ports in parallel. One may be marked "Uplink." It will not have a port marked "LAN" or "Internet." Business/professional class switches will sport many ports and possibly a serial or other port labeled "Console." Some may in fact have web administration tools.
Some older switches had a bridging function that converted "bus topology" thinnet to twisted pair - they had a BNC or AUI connector in addition to a number of Ethernet jacks. I believe there were also true "bridges" that simply converted a thinnet or thicknet to twisted pair. (I could be wrong, this is before my time.) You won't find these anymore.
A switch+router combination will have a number of ports, and one will usually be sectioned off and labeled "WAN" or "Internet." These days it's quite usual for it to sport antennas as well for wireless. (A switch will never have antennas.) It's rare for these to not have built-in web administration tools, a DHCP server, and other basic gateway functionality in addition to the routing function and wireless-to-wired bridging.
You may encounter a device called a "wireless bridge" which is used to "convert" something like a game console's wired Ethernet into wireless Ethernet. These will sport an antenna and one Ethernet port, and are generally small devices.