When you find a mistake/problem/error in the Production stage it is said to be a Defect
Where as when you find a mistake/problem/error when the product/project is released in to market it is said to be a Bug
For example : If in the Business Requirement Document its mentioned like a particular link appears at the top whereas in design document its mentioned at the bottom. then we will raise a defect in Defect tracking tool (eg: Hp QC ).
So defect can be any deviation . Bug is always error in program.
Defect: Which does not satify the functional requirements, Defect is usually identified by a customer,
Bug: it is Faults in a application which can be identified by tester , this terminology used by testers