Do it like in the Example: https://developer.android.com/guide/topics/connectivity/bluetooth.html#example_1
Note that you will probably need to know what kind of service/profile the module provides. Often, generic modules/devices use the Serial Port Profile (SPP).
You use createInsecureRfcommSocketToServiceRecord() or createRfcommSocketToServiceRecord() to connect.
Which UUID you need depends on the actual service the module provides. For SPP see e.g. How to find the UUID of serial port Bluetooth device?:
The short, 16-bit UUID for SPP is
0x1101
the full UUID is
"00001101-0000-1000-8000-00805f9b34fb"
So, on Android, you'd use
final UUID SPP_SERVICE_UUID = UUID.fromString("00001101-0000-1000-8000-00805f9b34fb");
final BluetoothSocket socket = device.createRfcommSocketToServiceRecord( SPP_SERVICE_UUID );
socket.connect();
final InputStream is = socket.getInputStream();
final OutputStream os = socket.getOutputStream();
// Send data to output stream and/or receive data from input stream
// ...
socket.close(); // Disconnect