Assuming that your entity is called "Person" and the attribute you are trying to set is called "Name" here is the code in Java that would create the object and set the attribute:
String param = "John Doe";
IMendixObject imo = Core.instantiate(context, "MyFirstModule.Person");
imo.setValue(context,"Name",param);
Hope this helps,
Andrej
If the string would be an object identifier, you are best of doing a Core.getXpathRequest().
If it's not, we'd need a bit more information on what you are trying to do. A String can't really be converted to a MendixObject representation otherwise.