The answer to 'how did ant get in my house' is that ants can enter your home through very small cracks and openings, often in search of food or water. Common entry points include gaps around windows and doors, cracks in the foundation, or holes where pipes or wires enter the home.
Ants are attracted to sources of food and moisture, so they may come inside looking for crumbs, spills, or even pet food. Once they find a way in, ants can quickly establish a colony and spread throughout your home. Seeing a few ants is often a sign of a larger infestation that needs to be addressed.