I am studying for CCNA certificate and wanted to know the actual difference between Hub-and-spoke and Star topologies. Could somebody explain me this as it looks identical to me.
In essence, hub-and-spoke network topology and star network topology are exactly the same thing. These are two names for the same topology.
That being said, plaese note that sometimes one specific term is preferred or even technically defined in specific contexts (although I guess people will understand if you use the other term, I try to use the term people will expect and likely understand in that specific context).
For instance, it's very common to use "star" for data modeling. I'm talking about the term star schema (I don't know if saying "hub-and-spoke schema" is inaccurate, I guess people will understand, but I try to avoid).
When talking about public transportation, it's common to say hub-and-spoke distribution or hub-and-spoke topology.
When talking about software-defined network connectivity, it's common to say hub-and-spoke model or hub-and-spoke design (for instance, these terms are used in AWS VPC connectivity).
My understanding is:
In practice, people like to use "star" when we're talking about devices/stuff directly connected (they are physical stuff and there is no built-in redundancy), and use "hub-and-spoke" when we have more general concepts linked (and the concepts and links are just logical and may have built-in redundancy).
Let me explain better...
When we have devices connected to a switch, routers connected in a star model, or even a star schema in database, if something go wrong with the central piece or with the connections/relations, things will fail. So we use the term star.
But if we have 4 cities A, B, C and D connected via A (B, C and D are connected to A), this is a hub-and-spoke model (A is the hub). We may have multiple paths from B to A, C to A and D to A (so it may be physical redundancy). And although traffic may get slow due to congestion in A, A is a city, doesn't make sense to say that A is a single-point of failure (hopefully there is no war happening in A :) ). And we may centralize security controls in A (like cameras that checks license plates) since everyone passes through A.
The same thing for VPCs on AWS. We may have a central VPC A, and VPCs B, C and D connected to A thought a TGW (AWS Transit Gateway). There is a central part (VPC). But links between VPCs, the VPC itself and the TGW are virtual concepts and highly redundant (not a single point of failure). Like in our previous example, TGW has bandwidth limits and we may see congestion if a bad design/project was done. And the VPC A can centralize security controls (firewall for inbound traffic, NAT for outbound traffic, etc).
In cases like these ones (transportation and VPCs), instead of use "star", I have seen people using the term hub-and-spoke.
One more time: although people prefer to use one specific term in some specific contexts, the two topologies are, technically speaking, the exact same thing!