Apple has written a wonderful book that details this. It can be found here:
https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html
I will bring it to answer your questions:
"What is the use of the header? Is it easy to use Objective-C and Swift code in the same project?"
To import a set of Objective-C files in the same target application as your Swift code, you rely on the Objective-C bridge header to output these files to Swift. Xcode suggests creating this header file when adding a Swift file to an existing Objective-C application or an Objective-C file to an existing Swift application.
The answer to that is yes. This is where Swift and Objective-C work together in the same project.
โShould we avoid using the bridge header? Let's say if there are two third-party libraries that are very similar, one is in Objective-C and the other is in Swift. Should we use the Swift library or use the Objective-C library. There is are there any flaws in using bridge headers? "
There are always tradeoffs. The first answer to this question is: you should not avoid using the bridge header; however, with respect to third-party libraries, you have to look at many factors. Who has more functionality? Is it supported and / or added frequently?
Using the Objective-C library will also add things you need to know about and get around. From book:
Troubleshooting Tips and Reminders
Treat your Swift and Objective-C files as the same code collection, and watch out for conflict naming.
If you are working with frameworks, make sure that the "Configure Modules" (DEFINES_MODULE) parameter in the "Packaging" section is set to "Yes".
If you are working with the Objective-C bridge header, make sure that the Objective-C Bridging Header assembly parameter (SWIFT_OBJC_BRIDGING_HEADER) in the Swift Compiler - Code Generation is set to the path to the bridge header file relative to your project (for example, "MyApp" / MyApp -Bridging- Header.h ").
Xcode uses your product module name (PRODUCT_MODULE_NAME) - not your target name (TARGET_NAME) - when assigning the Objective-C bridge header and the generated header for your Swift code. For information on naming a product module, see the "Naming Your Product" section.
To be accessible and useful in Objective-C, the Swift class must be a descendant of the Objective-C class or must be marked as @objc.
When you enter Swift code in Objective-C, remember that Objective-C will not be able to translate some functions specific to Swift. For a list, see Using Swift from Objective-C.
If you use your own Objective-C types in your Swift code, be sure to import the Objective-C headers for these types before importing the generated Swift header into the Objective-Cm file from which you want to use Swift code. <w> Swift scrolls marked with a private modifier do not appear in the generated header. Private ads are not exposed to Objective-C unless explicitly tagged with @IBAction, @IBOutlet or @objc.
For target applications, ads marked with an internal modifier are displayed in the generated header if the target of the application has an Objective-C bridge header.
For the purpose of the frames, only ads with an open modifier appear in the generated heading. You can still use the Swift methods and properties that are marked with the internal modifier from the Objective-C part of your framework, as they are declared in a class that inherits from the Objective-C class. For more information about access level modifiers, see Access Control in Swift Programming (Swift 2.2).