How to access mesh data of an object in a script?
I'm not sure what you're asking, but you can retrieve the mesh datablock associated with an object like

ob = bpy.context.object # get the active object for example
mesh = ob.data


The reverse is not directly possible. A mesh can be used by many objects, and the mesh doesn't know/store who its "owners" are. You can build a reverse index however:

mesh_owners = {}
for ob in bpy.data.objects:
    if ob.type == 'MESH':
        mesh_owners.setdefault(ob.data, []).append(ob)

print(mesh_owners[mesh])
# Example output - mesh is used by a one object:
#[bpy.data.objects['Cube.003']]